1 | <?php |
||
9 | class TypedCollection extends Collection |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $objectType; |
||
15 | |||
16 | /** |
||
17 | * @param string $objectType |
||
18 | */ |
||
19 | public function __construct($objectType) |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | public function getObjectType() |
||
31 | |||
32 | /** |
||
33 | * @param string $objectType |
||
34 | * |
||
35 | * @return $this |
||
36 | */ |
||
37 | protected function setObjectType($objectType) |
||
43 | |||
44 | public function offsetSet($offset, $value) |
||
50 | |||
51 | public function offsetGet($offset) |
||
59 | |||
60 | /** |
||
61 | * @param $value |
||
62 | * |
||
63 | * @throws NotValidObjectTypeException |
||
64 | */ |
||
65 | private function guardAgainstNotValidObjectType($value) |
||
71 | } |
||
72 |