Permalink
Browse files

feature #4517 [Reference] document configurable PropertyAccessor argu…

…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 3b9d60d2b018d895804710d4e684b7cf8c6af59b
Showing with 25 additions and 0 deletions.
  1. +2 −0 components/property_access/introduction.rst
  2. +23 −0 reference/configuration/framework.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
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -52,6 +52,9 @@ Configuration
* :ref:`enabled <translator.enabled>`
* `fallback`_
* `logging`_
* `property_accessor`_
* `magic_call`_
* `throw_exception_on_invalid_index`_
secret
~~~~~~
@@ -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
--------------------------

0 comments on commit 3b9d60d

Please sign in to comment.