1 | <?php |
||
16 | class CharCollection extends AbstractCollection |
||
17 | { |
||
18 | /** |
||
19 | * Apply a callback to each item in collection. |
||
20 | * |
||
21 | * Applies a callback to each item in collection and returns a new collection |
||
22 | * containing each iteration's return value. |
||
23 | * |
||
24 | * @param callable $callback The callback to apply |
||
25 | * |
||
26 | * @return AbstractCollection A new collection with callback return values |
||
27 | */ |
||
28 | 2 | public function map(callable $callback) |
|
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 1 | public function push(...$items) |
|
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 1 | public function unshift(...$items) |
|
52 | |||
53 | /** |
||
54 | * Convert input data to an array. |
||
55 | * |
||
56 | * Convert the input data to an array that can be worked with by a collection. |
||
57 | * |
||
58 | * @param mixed $data The input data |
||
59 | * |
||
60 | * @return array |
||
61 | */ |
||
62 | 25 | protected function prepareData($data) |
|
70 | |||
71 | /** |
||
72 | * Is data consistent with this collection type? |
||
73 | * |
||
74 | * @param mixed $data The data to check |
||
75 | * |
||
76 | * @return bool |
||
77 | */ |
||
78 | 25 | protected function isConsistentDataStructure($data) |
|
82 | } |
||
83 |