Skip to content

Commit 98a0fe4

Browse files
committed
Addressed @javiereguiluz comments
1 parent 27e2d02 commit 98a0fe4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

components/property_access.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,16 +450,16 @@ configuration files.
450450
<Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder::setMetadataFactory>`
451451
see `Enable other Features`_.
452452

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``.
455455

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
457457
method should be called when a get, set, add or remove operation is needed on the
458458
property.
459459

460460
.. configuration-block::
461461

462-
.. code-block:: php
462+
.. code-block:: php-annotations
463463
464464
// ...
465465
use Symfony\Component\PropertyAccess\Annotation\Property;
@@ -489,6 +489,7 @@ property.
489489
490490
.. code-block:: yaml
491491
492+
# src/AppBundle/Resources/config/property_access.yml
492493
Person:
493494
name:
494495
getter: getFullName
@@ -499,6 +500,7 @@ property.
499500
500501
.. code-block:: xml
501502
503+
<!-- src/AppBundle/Resources/config/property_access.xml -->
502504
<?xml version="1.0" ?>
503505
504506
<property-access xmlns="http://symfony.com/schema/dic/property-access-mapping"
@@ -525,15 +527,15 @@ Then, using the overriden methods is automatic:
525527
// will return 'Hello John Doe'
526528
527529
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``.
530532

531533
This allows creating virtual properties that are not directly stored in the
532534
object:
533535

534536
.. configuration-block::
535537

536-
.. code-block:: php
538+
.. code-block:: php-annotations
537539
538540
// ...
539541
use Symfony\Component\PropertyAccess\Annotation\PropertyGetter;

0 commit comments

Comments
 (0)