1 | <?php |
||
22 | trait OwnerMutator |
||
23 | { |
||
24 | /** |
||
25 | * @var Element|null |
||
26 | */ |
||
27 | private $owner; |
||
28 | |||
29 | /** |
||
30 | * Set associated ownerId |
||
31 | * |
||
32 | * @param $id |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function setOwnerId(int $id = null) |
||
40 | |||
41 | /** |
||
42 | * Get associated ownerId |
||
43 | * |
||
44 | * @return int|null |
||
45 | */ |
||
46 | public function getOwnerId() |
||
54 | |||
55 | /** |
||
56 | * Associate a owner |
||
57 | * |
||
58 | * @param mixed $owner |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setOwner($owner = null) |
||
75 | |||
76 | /** |
||
77 | * @return ElementInterface|null |
||
78 | */ |
||
79 | public function getOwner() |
||
98 | |||
99 | /** |
||
100 | * @return ElementInterface|null |
||
101 | */ |
||
102 | protected function resolveOwner() |
||
110 | |||
111 | /** |
||
112 | * @return ElementInterface|null |
||
113 | */ |
||
114 | private function resolveOwnerFromId() |
||
122 | |||
123 | /** |
||
124 | * @param mixed $owner |
||
125 | * @return ElementInterface|Element|null |
||
126 | */ |
||
127 | protected function internalResolveOwner($owner = null) |
||
147 | } |
||
148 |