We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5961ea1 commit b38c05eCopy full SHA for b38c05e
components/property_access.rst
@@ -204,12 +204,22 @@ The ``getValue()`` method can also use the magic ``__get()`` method::
204
{
205
return $this->children[$id];
206
}
207
+
208
+ public function __isset($id): bool
209
+ {
210
+ return true;
211
+ }
212
213
214
$person = new Person();
215
216
var_dump($propertyAccessor->getValue($person, 'Wouter')); // [...]
217
218
+.. caution::
219
220
+ When implementing the magic ``__get()`` method, you also need to implement
221
+ ``__isset()``.
222
223
.. versionadded:: 5.2
224
225
The magic ``__get()`` method can be disabled since in Symfony 5.2.
0 commit comments