@@ -450,16 +450,16 @@ configuration files.
450
450
<Symfony\\ Component\\ PropertyAccess\\ PropertyAccessorBuilder::setMetadataFactory> `
451
451
see `Enable other Features `_.
452
452
453
- There are four method calls that can be overriden: `getter `, `setter `, `adder ` and
454
- `remover `.
453
+ There are four method calls that can be overriden: `` getter `` , `` setter `` , `` adder ` ` and
454
+ `` remover ` `.
455
455
456
- When using annotations you can precede a property with `@Property ` to state which
456
+ When using annotations you can precede a property with `` @Property ` ` to state which
457
457
method should be called when a get, set, add or remove operation is needed on the
458
458
property.
459
459
460
460
.. configuration-block ::
461
461
462
- .. code-block :: php
462
+ .. code-block :: php-annotations
463
463
464
464
// ...
465
465
use Symfony\Component\PropertyAccess\Annotation\Property;
@@ -489,6 +489,7 @@ property.
489
489
490
490
.. code-block :: yaml
491
491
492
+ # src/AppBundle/Resources/config/property_access.yml
492
493
Person :
493
494
name :
494
495
getter : getFullName
@@ -499,6 +500,7 @@ property.
499
500
500
501
.. code-block :: xml
501
502
503
+ <!-- src/AppBundle/Resources/config/property_access.xml -->
502
504
<?xml version =" 1.0" ?>
503
505
504
506
<property-access xmlns =" http://symfony.com/schema/dic/property-access-mapping"
@@ -525,15 +527,15 @@ Then, using the overriden methods is automatic:
525
527
// will return 'Hello John Doe'
526
528
527
529
You can also associate a particular method with an operation on a property
528
- using the `@PropertyGetter `, `@PropertySetter `, `@PropertyAdder ` and
529
- `@PropertyRemover ` annotations. All of them take only one parameter: `property `.
530
+ using the `` @PropertyGetter `` , `` @PropertySetter `` , `` @PropertyAdder ` ` and
531
+ `` @PropertyRemover `` annotations. All of them take only one parameter: `` property ` `.
530
532
531
533
This allows creating virtual properties that are not directly stored in the
532
534
object:
533
535
534
536
.. configuration-block ::
535
537
536
- .. code-block :: php
538
+ .. code-block :: php-annotations
537
539
538
540
// ...
539
541
use Symfony\Component\PropertyAccess\Annotation\PropertyGetter;
0 commit comments