21
21
-----
22
22
23
23
The entry point of this component is the
24
- :method: `PropertyAccess::createPropertyAccessor< Symfony\\ Component\\ PropertyAccess\\ PropertyAccess::createPropertyAccessor> `
24
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccess::createPropertyAccessor `
25
25
factory. This factory will create a new instance of the
26
26
:class: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor ` class with the
27
27
default configuration::
@@ -34,8 +34,8 @@ Reading from Arrays
34
34
-------------------
35
35
36
36
You can read an array with the
37
- :method: `PropertyAccessor::getValue< Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue> `
38
- method. This is done using the index notation that is used in PHP::
37
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue ` method.
38
+ This is done using the index notation that is used in PHP::
39
39
40
40
// ...
41
41
$person = [
@@ -175,7 +175,7 @@ Accessing a non Existing Property Path
175
175
Symfony 4.3.
176
176
177
177
By default a :class: `Symfony\\ Component\\ PropertyAccess\\ Exception\\ NoSuchPropertyException `
178
- is thrown if the property path passed to :method: `PropertyAccessor::getValue< Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue> `
178
+ is thrown if the property path passed to :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue `
179
179
does not exist. You can change this behavior using the
180
180
:method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessorBuilder::disableExceptionOnInvalidPropertyPath `
181
181
method::
@@ -259,16 +259,15 @@ enable this feature by using :class:`Symfony\\Component\\PropertyAccess\\Propert
259
259
.. caution ::
260
260
261
261
The ``__call() `` feature is disabled by default, you can enable it by calling
262
- :method: `PropertyAccessorBuilder::enableMagicCall< Symfony\\ Component\\ PropertyAccess\\ PropertyAccessorBuilder::enableMagicCall> `
262
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessorBuilder::enableMagicCall `
263
263
see `Enable other Features `_.
264
264
265
265
Writing to Arrays
266
266
-----------------
267
267
268
268
The ``PropertyAccessor `` class can do more than just read an array, it can
269
269
also write to an array. This can be achieved using the
270
- :method: `PropertyAccessor::setValue<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::setValue> `
271
- method::
270
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::setValue ` method::
272
271
273
272
// ...
274
273
$person = [];
@@ -404,20 +403,18 @@ Checking Property Paths
404
403
-----------------------
405
404
406
405
When you want to check whether
407
- :method: `PropertyAccessor::getValue<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue> `
408
- can safely be called without actually calling that method, you can use
409
- :method: `PropertyAccessor::isReadable<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::isReadable> `
410
- instead::
406
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::getValue ` can
407
+ safely be called without actually calling that method, you can use
408
+ :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::isReadable ` instead::
411
409
412
410
$person = new Person();
413
411
414
412
if ($propertyAccessor->isReadable($person, 'firstName')) {
415
413
// ...
416
414
}
417
415
418
- The same is possible for :method: `PropertyAccessor::setValue<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::setValue> `:
419
- Call the
420
- :method: `PropertyAccessor::isWritable<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::isWritable> `
416
+ The same is possible for :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::setValue `:
417
+ Call the :method: `Symfony\\ Component\\ PropertyAccess\\ PropertyAccessor::isWritable `
421
418
method to find out whether a property path can be updated::
422
419
423
420
$person = new Person();
0 commit comments