We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f2e73a + 24c3fc2 commit 7c2d5a6Copy full SHA for 7c2d5a6
components/property_access.rst
@@ -258,16 +258,21 @@ The ``getValue()`` method can also use the magic ``__get()`` method::
258
{
259
return $this->children[$id];
260
}
261
+
262
+ public function __isset($id): bool
263
+ {
264
+ return true;
265
+ }
266
267
268
$person = new Person();
269
270
var_dump($propertyAccessor->getValue($person, 'Wouter')); // [...]
271
-.. note::
272
+.. caution::
273
- The ``__get()`` method support is enabled by default.
- See `Enable other Features`_ if you want to disable it.
274
+ When implementing the magic ``__get()`` method, you also need to implement
275
+ ``__isset()``.
276
277
.. _components-property-access-magic-call:
278
0 commit comments