@@ -397,16 +397,16 @@ configuration files.
397
397
<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessorBuilder::setMetadataFactory> `
398
398
see `Enable other Features `_.
399
399
400
- There are four method calls that can be overriden: `getter `, `setter `, `adder ` and
401
- `remover `.
400
+ There are four method calls that can be overriden: `` getter `` , `` setter `` , `` adder ` ` and
401
+ `` remover ` `.
402
402
403
- When using annotations you can precede a property with `@Property ` to state which
403
+ When using annotations you can precede a property with `` @Property ` ` to state which
404
404
method should be called when a get, set, add or remove operation is needed on the
405
405
property.
406
406
407
407
.. configuration-block ::
408
408
409
- .. code-block :: php
409
+ .. code-block :: php-annotations
410
410
411
411
// ...
412
412
use Symfony\Component\PropertyAccess\Annotation\Property;
@@ -436,6 +436,7 @@ property.
436
436
437
437
.. code-block :: yaml
438
438
439
+ # src/AppBundle/Resources/config/property_access.yml
439
440
Person :
440
441
name :
441
442
getter : getFullName
@@ -446,6 +447,7 @@ property.
446
447
447
448
.. code-block :: xml
448
449
450
+ <!-- src/AppBundle/Resources/config/property_access.xml -->
449
451
<?xml version =" 1.0" ?>
450
452
451
453
<property-access xmlns =" http://symfony.com/schema/dic/property-access-mapping"
@@ -472,8 +474,8 @@ Then, using the overriden methods is automatic:
472
474
// will return 'Hello John Doe'
473
475
474
476
You can also associate a particular method with an operation on a property
475
- using the `@PropertyGetter `, `@PropertySetter `, `@PropertyAdder ` and
476
- `@PropertyRemover ` annotations. All of them take only one parameter: `property `.
477
+ using the `` @PropertyGetter `` , `` @PropertySetter `` , `` @PropertyAdder ` ` and
478
+ `` @PropertyRemover `` annotations. All of them take only one parameter: `` property ` `.
477
479
478
480
This allows creating virtual properties that are not directly stored in the
479
481
object:
@@ -550,10 +552,10 @@ Using property metadata with Symfony
550
552
By default, Symfony will look for property metadata in the following places
551
553
inside each bundle path:
552
554
553
- - `<Bundle path>/Resources/config/property_access.xml `
554
- - `<Bundle path>/Resources/config/property_access.yml `
555
- - `<Bundle path>/Resources/config/property_access/*.xml `
556
- - `<Bundle path>/Resources/config/property_access/*.yml `
555
+ - `` <Bundle path>/Resources/config/property_access.xml ` `
556
+ - `` <Bundle path>/Resources/config/property_access.yml ` `
557
+ - `` <Bundle path>/Resources/config/property_access/*.xml ` `
558
+ - `` <Bundle path>/Resources/config/property_access/*.yml ` `
557
559
558
560
If you need getting metadata from annotations you must explicitly enable them:
559
561
0 commit comments