Skip to content

Commit

Permalink
feature #4517 [Reference] document configurable PropertyAccessor argu…
Browse files Browse the repository at this point in the history
…ments (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
  • Loading branch information
weaverryan committed Dec 7, 2014
2 parents 32e6f06 + 828ba4d commit 3b9d60d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/property_access/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
23 changes: 23 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Configuration
* :ref:`enabled <translator.enabled>`
* `fallback`_
* `logging`_
* `property_accessor`_
* `magic_call`_
* `throw_exception_on_invalid_index`_

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

property_accessor
~~~~~~~~~~~~~~~~~

magic_call
..........

**type**: ``boolean`` **default**: ``false``

When enabled, the ``property_accessor`` service uses PHP's
:ref:`magic __call() method <components-property-access-magic-call>` 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
--------------------------

Expand Down

0 comments on commit 3b9d60d

Please sign in to comment.