1 | <?php |
||
10 | class Collection |
||
11 | { |
||
12 | /** |
||
13 | * Collection items. |
||
14 | * |
||
15 | * @var array|\Illuminate\Support\Collection |
||
16 | */ |
||
17 | protected $items = []; |
||
18 | |||
19 | /** |
||
20 | * Get a new Collection instance. |
||
21 | * |
||
22 | * @param array $items |
||
23 | */ |
||
24 | public function __construct(array $items) |
||
28 | |||
29 | /** |
||
30 | * Cast an array into the framework native collection. |
||
31 | * |
||
32 | * @param array $items |
||
33 | * @return array|\Illuminate\Support\Collection |
||
34 | */ |
||
35 | public static function collect(array $items) |
||
39 | |||
40 | /** |
||
41 | * Get a new Collection instance. |
||
42 | * |
||
43 | * @param array $items |
||
44 | * @return self |
||
45 | */ |
||
46 | public static function make(array $items): self |
||
50 | |||
51 | /** |
||
52 | * Run a map over each of the items. |
||
53 | * |
||
54 | * @param callable $callback |
||
55 | * @return array|\Illuminate\Support\Collection |
||
56 | */ |
||
57 | public function map(callable $callback) |
||
65 | |||
66 | /** |
||
67 | * Undocumented function |
||
68 | * |
||
69 | * @return array|\Illuminate\Support\Collection |
||
70 | */ |
||
71 | public function mapInto(string $model) |
||
81 | } |
||
82 |