1 | <?php |
||
15 | trait ModelsAwareTrait |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Annotated model |
||
20 | * @var AnnotatedInterface[] |
||
21 | */ |
||
22 | private $models = []; |
||
23 | |||
24 | /** |
||
25 | * Annotated models |
||
26 | * @var AnnotatedInterface[] |
||
27 | */ |
||
28 | public function getModels() |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | * @param AnnotatedInterface[] $models |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function setModels($models) |
||
43 | |||
44 | /** |
||
45 | * Add model to set but only if it's instance is not present in set. |
||
46 | * |
||
47 | * @param AnnotatedInterface $model |
||
48 | * @return boolean Whether model was added |
||
49 | */ |
||
50 | public function addModel(AnnotatedInterface $model) |
||
54 | |||
55 | /** |
||
56 | * Remove model from set. |
||
57 | * |
||
58 | * @param AnnotatedInterface $model |
||
59 | * @return boolean Whether model was removed |
||
60 | */ |
||
61 | public function removeModel(AnnotatedInterface $model) |
||
79 | |||
80 | public function hasModel(AnnotatedInterface $model) |
||
91 | |||
92 | } |
||
93 |