1 | <?php |
||
22 | class CharCollection extends AbstractCollection |
||
23 | { |
||
24 | /** |
||
25 | * Apply a callback to each item in collection. |
||
26 | * |
||
27 | * Applies a callback to each item in collection and returns a new collection |
||
28 | * containing each iteration's return value. |
||
29 | * |
||
30 | * @param callable $callback The callback to apply |
||
31 | * |
||
32 | * @return CharCollection A new collection with callback return values |
||
33 | */ |
||
34 | 2 | public function map(callable $callback) |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 1 | public function push(...$items) |
|
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | 1 | public function unshift(...$items) |
|
58 | |||
59 | /** |
||
60 | * Convert input data to an array. |
||
61 | * |
||
62 | * Convert the input data to an array that can be worked with by a collection. |
||
63 | * |
||
64 | * @param mixed $data The input data |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | 25 | protected function prepareData($data) |
|
76 | |||
77 | /** |
||
78 | * Is data consistent with this collection type? |
||
79 | * |
||
80 | * @param mixed $data The data to check |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | 25 | protected function isConsistentDataStructure($data) |
|
88 | } |
||
89 |