diff --git a/components/property_access/introduction.rst b/components/property_access/introduction.rst index 55bbda909c3..0b0265dabec 100644 --- a/components/property_access/introduction.rst +++ b/components/property_access/introduction.rst @@ -175,6 +175,8 @@ The ``getValue`` method can also use the magic ``__get`` method:: echo $accessor->getValue($person, 'Wouter'); // array(...) +.. _components-property-access-magic-call: + Magic ``__call()`` Method ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 9cfb5b6947b..991c55aaf34 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -48,6 +48,9 @@ Configuration * `profiler`_ * `collect`_ * :ref:`enabled ` +* `property_accessor`_ + * `magic_call`_ + * `throw_exception_on_invalid_index`_ secret ~~~~~~ @@ -495,6 +498,26 @@ and activate the data collectors by hand:: $profiler->enable(); +property_accessor +~~~~~~~~~~~~~~~~~ + +magic_call +.......... + +**type**: ``boolean`` **default**: ``false`` + +When enabled, the ``property_accessor`` service uses PHP's +:ref:`magic __call() method ` when +its ``getValue()`` method is called. + +throw_exception_on_invalid_index +................................ + +**type**: ``boolean`` **default**: ``false`` + +When enabled, the ``property_accessor`` service throws an exception when you +try to access an invalid index of an array. + Full default Configuration --------------------------