Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b9d60d

Browse filesBrowse 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
Copy full SHA for 3b9d60d

File tree

Expand file treeCollapse file tree

2 files changed

+25
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+25
-0
lines changed

‎components/property_access/introduction.rst

Copy file name to clipboardExpand all lines: components/property_access/introduction.rst
+2Lines changed: 2 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: reference/configuration/framework.rst
+23Lines changed: 23 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.