Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 150 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 150 Revision 399
Zeile 626... Zeile 626...
626
    {
626
    {
627
        return new static(array_intersect($this->items, $this->getArrayableItems($items)));
627
        return new static(array_intersect($this->items, $this->getArrayableItems($items)));
628
    }
628
    }
Zeile 629... Zeile 629...
629
 
629
 
-
 
630
    /**
-
 
631
     * Intersect the collection with the given items, using the callback.
-
 
632
     *
-
 
633
     * @param  \Illuminate\Contracts\Support\Arrayable<array-key, TValue>|iterable<array-key, TValue>  $items
-
 
634
     * @param  callable(TValue, TValue): int  $callback
-
 
635
     * @return static
-
 
636
     */
-
 
637
    public function intersectUsing($items, callable $callback)
-
 
638
    {
-
 
639
        return new static(array_uintersect($this->items, $this->getArrayableItems($items), $callback));
-
 
640
    }
-
 
641
 
-
 
642
    /**
-
 
643
     * Intersect the collection with the given items with additional index check.
-
 
644
     *
-
 
645
     * @param  \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue>  $items
-
 
646
     * @return static
-
 
647
     */
-
 
648
    public function intersectAssoc($items)
-
 
649
    {
-
 
650
        return new static(array_intersect_assoc($this->items, $this->getArrayableItems($items)));
-
 
651
    }
-
 
652
 
-
 
653
    /**
-
 
654
     * Intersect the collection with the given items with additional index check, using the callback.
-
 
655
     *
-
 
656
     * @param  \Illuminate\Contracts\Support\Arrayable<array-key, TValue>|iterable<array-key, TValue>  $items
-
 
657
     * @param  callable(TValue, TValue): int  $callback
-
 
658
     * @return static
-
 
659
     */
-
 
660
    public function intersectAssocUsing($items, callable $callback)
-
 
661
    {
-
 
662
        return new static(array_intersect_uassoc($this->items, $this->getArrayableItems($items), $callback));
-
 
663
    }
-
 
664
 
630
    /**
665
    /**
631
     * Intersect the collection with the given items by key.
666
     * Intersect the collection with the given items by key.
632
     *
667
     *
633
     * @param  \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue>  $items
668
     * @param  \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue>  $items
634
     * @return static
669
     * @return static
Zeile 870... Zeile 905...
870
    }
905
    }
Zeile 871... Zeile 906...
871
 
906
 
872
    /**
907
    /**
873
     * Get the items with the specified keys.
908
     * Get the items with the specified keys.
874
     *
909
     *
875
     * @param  \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey>|string  $keys
910
     * @param  \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey>|string|null  $keys
876
     * @return static
911
     * @return static
877
     */
912
     */
878
    public function only($keys)
913
    public function only($keys)
879
    {
914
    {