1 | <?php |
||
25 | trait ModelsAwareTrait |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Annotated model |
||
30 | * @var AnnotatedInterface[] |
||
31 | */ |
||
32 | private $models = []; |
||
33 | |||
34 | /** |
||
35 | * Annotated models |
||
36 | * @var AnnotatedInterface[] |
||
37 | */ |
||
38 | public function getModels() |
||
42 | |||
43 | /** |
||
44 | * |
||
45 | * @param AnnotatedInterface[] $models |
||
46 | * @return $this |
||
47 | */ |
||
48 | public function setModels($models) |
||
53 | |||
54 | /** |
||
55 | * Add model to set but only if it's instance is not present in set. |
||
56 | * |
||
57 | * @param AnnotatedInterface $model |
||
58 | * @return boolean Whether model was added |
||
59 | */ |
||
60 | public function addModel(AnnotatedInterface $model) |
||
64 | |||
65 | /** |
||
66 | * Remove model from set. |
||
67 | * |
||
68 | * @param AnnotatedInterface $model |
||
69 | * @return boolean Whether model was removed |
||
70 | */ |
||
71 | public function removeModel(AnnotatedInterface $model) |
||
89 | |||
90 | public function hasModel(AnnotatedInterface $model) |
||
101 | |||
102 | } |
||
103 |