Skip to content

Commit 3b9d60d

Browse files
committed
feature #4517 [Reference] document configurable PropertyAccessor arguments (xabbuh)
This PR was merged into the 2.6 branch. Discussion ---------- [Reference] document configurable PropertyAccessor arguments | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes (symfony/symfony#11731) | Applies to | 2.6+ | Fixed tickets | #4192 Commits ------- 828ba4d document configurable PropertyAccessor arguments
2 parents 32e6f06 + 828ba4d commit 3b9d60d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

components/property_access/introduction.rst

+2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ The ``getValue`` method can also use the magic ``__get`` method::
175175

176176
echo $accessor->getValue($person, 'Wouter'); // array(...)
177177

178+
.. _components-property-access-magic-call:
179+
178180
Magic ``__call()`` Method
179181
~~~~~~~~~~~~~~~~~~~~~~~~~
180182

reference/configuration/framework.rst

+23
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Configuration
5252
* :ref:`enabled <translator.enabled>`
5353
* `fallback`_
5454
* `logging`_
55+
* `property_accessor`_
56+
* `magic_call`_
57+
* `throw_exception_on_invalid_index`_
5558

5659
secret
5760
~~~~~~
@@ -535,6 +538,26 @@ for a given key. The logs are made to the ``translation`` channel and at the
535538
``debug`` for level for keys where there is a translation in the fallback
536539
locale and the ``warning`` level if there is no translation to use at all.
537540

541+
property_accessor
542+
~~~~~~~~~~~~~~~~~
543+
544+
magic_call
545+
..........
546+
547+
**type**: ``boolean`` **default**: ``false``
548+
549+
When enabled, the ``property_accessor`` service uses PHP's
550+
:ref:`magic __call() method <components-property-access-magic-call>` when
551+
its ``getValue()`` method is called.
552+
553+
throw_exception_on_invalid_index
554+
................................
555+
556+
**type**: ``boolean`` **default**: ``false``
557+
558+
When enabled, the ``property_accessor`` service throws an exception when you
559+
try to access an invalid index of an array.
560+
538561
Full default Configuration
539562
--------------------------
540563

0 commit comments

Comments
 (0)