File tree 2 files changed +25
-0
lines changed
components/property_access
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ The ``getValue`` method can also use the magic ``__get`` method::
175
175
176
176
echo $accessor->getValue($person, 'Wouter'); // array(...)
177
177
178
+ .. _components-property-access-magic-call :
179
+
178
180
Magic ``__call() `` Method
179
181
~~~~~~~~~~~~~~~~~~~~~~~~~
180
182
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ Configuration
52
52
* :ref: `enabled <translator.enabled >`
53
53
* `fallback `_
54
54
* `logging `_
55
+ * `property_accessor `_
56
+ * `magic_call `_
57
+ * `throw_exception_on_invalid_index `_
55
58
56
59
secret
57
60
~~~~~~
@@ -535,6 +538,26 @@ for a given key. The logs are made to the ``translation`` channel and at the
535
538
``debug `` for level for keys where there is a translation in the fallback
536
539
locale and the ``warning `` level if there is no translation to use at all.
537
540
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
+
538
561
Full default Configuration
539
562
--------------------------
540
563
You can’t perform that action at this time.
0 commit comments