1 | <?php |
||
11 | abstract class AbstractTypedObjectCollection implements ObjectCollectionInterface |
||
12 | { |
||
13 | use CollectionTrait { |
||
14 | CollectionTrait::add as protected addWithoutCheck; |
||
15 | } |
||
16 | use ObjectCollectionTrait; |
||
17 | |||
18 | /** |
||
19 | * @return string[] |
||
20 | */ |
||
21 | abstract protected function getAllowedItemTypes(); |
||
22 | |||
23 | /** |
||
24 | * @param $item |
||
25 | * @return bool |
||
26 | */ |
||
27 | protected function checkType($item) |
||
36 | |||
37 | public function add($item, $prepend = false) |
||
42 | } |
||
43 |