1 | <?php |
||
18 | abstract class Collection implements CollectionFacade |
||
19 | { |
||
20 | /** |
||
21 | * Generic item getter |
||
22 | * |
||
23 | * @param string $type Item type |
||
24 | * @param array $arguments Arguments |
||
25 | * |
||
26 | * @return ItemInterface Item |
||
27 | * @throws InvalidArgumentException If the item index is invalid |
||
28 | * @api |
||
29 | */ |
||
30 | 3 | public function __call($type, $arguments) |
|
48 | |||
49 | /** |
||
50 | * Return an item by type and index |
||
51 | * |
||
52 | * @param string $type Item type |
||
53 | * @param int $index Item index |
||
54 | * |
||
55 | * @return ItemInterface Item |
||
56 | * @throws OutOfBoundsException If the item index is out of bounds |
||
57 | */ |
||
58 | 3 | private function getItemByTypeAndIndex($type, $index) |
|
72 | } |
||
73 |