1 | <?php |
||
31 | class ManyToMorphedRelation extends AbstractRelation |
||
32 | { |
||
33 | /** |
||
34 | * Set of nested relations. |
||
35 | * |
||
36 | * @var ManyToManyRelation[] |
||
37 | */ |
||
38 | private $nested = []; |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function isLoaded(): bool |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function hasRelated(): bool |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function setRelated($value) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getRelated() |
||
81 | |||
82 | /** |
||
83 | * All possible outer variations. |
||
84 | * |
||
85 | * @return array |
||
86 | */ |
||
87 | public function getVariations(): array |
||
91 | |||
92 | /** |
||
93 | * Get nested relation for a given variation. |
||
94 | * |
||
95 | * @param string $variation |
||
96 | * |
||
97 | * @return ManyToManyRelation |
||
98 | * |
||
99 | * @throws RelationException |
||
100 | */ |
||
101 | public function getVariation(string $variation): ManyToManyRelation |
||
122 | |||
123 | /** |
||
124 | * @param string $name |
||
125 | * |
||
126 | * @return ManyToManyRelation |
||
127 | */ |
||
128 | public function __get(string $name) |
||
132 | |||
133 | /** |
||
134 | * @param string $variation |
||
135 | * @param mixed $value |
||
136 | */ |
||
137 | public function __set(string $variation, $value) |
||
141 | |||
142 | /** |
||
143 | * @param string $variation |
||
144 | * |
||
145 | * @return bool |
||
146 | */ |
||
147 | public function __isset(string $variation) |
||
151 | |||
152 | /** |
||
153 | * @param string $variation |
||
154 | */ |
||
155 | public function __unset(string $variation) |
||
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | public function queueCommands(ContextualCommandInterface $parentCommand): CommandInterface |
||
174 | |||
175 | /** |
||
176 | * Create relation schema for nested relation. |
||
177 | * |
||
178 | * @param string $class |
||
179 | * |
||
180 | * @return array |
||
181 | */ |
||
182 | protected function makeSchema(string $class): array |
||
197 | } |