Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 148 Revision 150
Zeile 580... Zeile 580...
580
    /**
580
    /**
581
     * The following methods are intercepted to always return base collections.
581
     * The following methods are intercepted to always return base collections.
582
     */
582
     */
Zeile 583... Zeile 583...
583
 
583
 
584
    /**
-
 
585
     * Get an array with the values of a given key.
-
 
586
     *
-
 
587
     * @param  string|array<array-key, string>  $value
-
 
588
     * @param  string|null  $key
-
 
589
     * @return \Illuminate\Support\Collection<array-key, mixed>
-
 
590
     */
-
 
591
    public function pluck($value, $key = null)
-
 
592
    {
-
 
593
        return $this->toBase()->pluck($value, $key);
-
 
594
    }
-
 
595
 
-
 
596
    /**
-
 
597
     * Get the keys of the collection items.
-
 
598
     *
-
 
599
     * @return \Illuminate\Support\Collection<int, TKey>
-
 
600
     */
-
 
601
    public function keys()
-
 
602
    {
-
 
603
        return $this->toBase()->keys();
-
 
604
    }
-
 
605
 
-
 
606
    /**
584
    /**
607
     * Zip the collection together with one or more arrays.
-
 
608
     *
-
 
609
     * @template TZipValue
585
     * Count the number of items in the collection by a field or using a callback.
610
     *
586
     *
611
     * @param  \Illuminate\Contracts\Support\Arrayable<array-key, TZipValue>|iterable<array-key, TZipValue>  ...$items
587
     * @param  (callable(TValue, TKey): array-key)|string|null  $countBy
612
     * @return \Illuminate\Support\Collection<int, \Illuminate\Support\Collection<int, TModel|TZipValue>>
588
     * @return \Illuminate\Support\Collection<array-key, int>
613
     */
589
     */
614
    public function zip($items)
590
    public function countBy($countBy = null)
615
    {
591
    {
616
        return $this->toBase()->zip(...func_get_args());
592
        return $this->toBase()->countBy($countBy);
Zeile 617... Zeile 593...
617
    }
593
    }
618
 
594
 
619
    /**
595
    /**
Zeile 646... Zeile 622...
646
    {
622
    {
647
        return $this->toBase()->flip();
623
        return $this->toBase()->flip();
648
    }
624
    }
Zeile 649... Zeile 625...
649
 
625
 
-
 
626
    /**
-
 
627
     * Get the keys of the collection items.
-
 
628
     *
-
 
629
     * @return \Illuminate\Support\Collection<int, TKey>
-
 
630
     */
-
 
631
    public function keys()
-
 
632
    {
-
 
633
        return $this->toBase()->keys();
-
 
634
    }
-
 
635
 
650
    /**
636
    /**
651
     * Pad collection to the specified length with a value.
637
     * Pad collection to the specified length with a value.
652
     *
638
     *
653
     * @template TPadValue
639
     * @template TPadValue
654
     *
640
     *
Zeile 660... Zeile 646...
660
    {
646
    {
661
        return $this->toBase()->pad($size, $value);
647
        return $this->toBase()->pad($size, $value);
662
    }
648
    }
Zeile 663... Zeile 649...
663
 
649
 
-
 
650
    /**
-
 
651
     * Get an array with the values of a given key.
-
 
652
     *
-
 
653
     * @param  string|array<array-key, string>  $value
-
 
654
     * @param  string|null  $key
-
 
655
     * @return \Illuminate\Support\Collection<array-key, mixed>
-
 
656
     */
-
 
657
    public function pluck($value, $key = null)
-
 
658
    {
-
 
659
        return $this->toBase()->pluck($value, $key);
-
 
660
    }
-
 
661
 
-
 
662
    /**
-
 
663
     * Zip the collection together with one or more arrays.
-
 
664
     *
-
 
665
     * @template TZipValue
-
 
666
     *
-
 
667
     * @param  \Illuminate\Contracts\Support\Arrayable<array-key, TZipValue>|iterable<array-key, TZipValue>  ...$items
-
 
668
     * @return \Illuminate\Support\Collection<int, \Illuminate\Support\Collection<int, TModel|TZipValue>>
-
 
669
     */
-
 
670
    public function zip($items)
-
 
671
    {
-
 
672
        return $this->toBase()->zip(...func_get_args());
-
 
673
    }
-
 
674
 
664
    /**
675
    /**
665
     * Get the comparison function to detect duplicates.
676
     * Get the comparison function to detect duplicates.
666
     *
677
     *
667
     * @param  bool  $strict
678
     * @param  bool  $strict
668
     * @return callable(TValue, TValue): bool
679
     * @return callable(TValue, TValue): bool