Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd683e7

Browse filesBrowse files
committed
Addressed @javiereguiluz comments
1 parent d0d5591 commit cd683e7
Copy full SHA for cd683e7

File tree

1 file changed

+13
-11
lines changed
Filter options

1 file changed

+13
-11
lines changed

‎components/property_access/introduction.rst

Copy file name to clipboardExpand all lines: components/property_access/introduction.rst
+13-11Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,16 @@ configuration files.
397397
<Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder::setMetadataFactory>`
398398
see `Enable other Features`_.
399399

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

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

407407
.. configuration-block::
408408

409-
.. code-block:: php
409+
.. code-block:: php-annotations
410410
411411
// ...
412412
use Symfony\Component\PropertyAccess\Annotation\Property;
@@ -436,6 +436,7 @@ property.
436436
437437
.. code-block:: yaml
438438
439+
# src/AppBundle/Resources/config/property_access.yml
439440
Person:
440441
name:
441442
getter: getFullName
@@ -446,6 +447,7 @@ property.
446447
447448
.. code-block:: xml
448449
450+
<!-- src/AppBundle/Resources/config/property_access.xml -->
449451
<?xml version="1.0" ?>
450452
451453
<property-access xmlns="http://symfony.com/schema/dic/property-access-mapping"
@@ -472,15 +474,15 @@ Then, using the overriden methods is automatic:
472474
// will return 'Hello John Doe'
473475
474476
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``.
477479

478480
This allows creating virtual properties that are not directly stored in the
479481
object:
480482

481483
.. configuration-block::
482484

483-
.. code-block:: php
485+
.. code-block:: php-annotations
484486
485487
// ...
486488
use Symfony\Component\PropertyAccess\Annotation\PropertyGetter;
@@ -550,10 +552,10 @@ Using property metadata with Symfony
550552
By default, Symfony will look for property metadata in the following places
551553
inside each bundle path:
552554

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``
557559

558560
If you need getting metadata from annotations you must explicitly enable them:
559561

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.