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 8e49d0a + 1a1239d commit b572c66Copy full SHA for b572c66
components/property_access.rst
@@ -249,16 +249,21 @@ The ``getValue()`` method can also use the magic ``__get()`` method::
249
{
250
return $this->children[$id];
251
}
252
+
253
+ public function __isset($id): bool
254
+ {
255
+ return true;
256
+ }
257
258
259
$person = new Person();
260
261
var_dump($propertyAccessor->getValue($person, 'Wouter')); // [...]
262
-.. note::
263
+.. caution::
264
- The ``__get()`` method support is enabled by default.
- See `Enable other Features`_ if you want to disable it.
265
+ When implementing the magic ``__get()`` method, you also need to implement
266
+ ``__isset()``.
267
268
.. _components-property-access-magic-call:
269
0 commit comments