Skip to content

Commit d048d98

Browse files
bocharsky-bwxabbuh
authored andcommitted
Some minor tweaks related to Doctrine docs
1 parent ed3ae3c commit d048d98

4 files changed

+14
-9
lines changed

doctrine/event_listeners_subscribers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Creating the Listener Class
122122

123123
In the previous example, a service ``my.listener`` was configured as a Doctrine
124124
listener on the event ``postPersist``. The class behind that service must have
125-
a ``postPersist`` method, which will be called when the event is dispatched::
125+
a ``postPersist()`` method, which will be called when the event is dispatched::
126126

127127
// src/AppBundle/EventListener/SearchIndexer.php
128128
namespace AppBundle\EventListener;

doctrine/mapping_model_classes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ be adapted for your case::
9696
}
9797
}
9898

99-
Note the :phpfunction:`class_exists` check. This is crucial, as you do not want your
99+
Note the :phpfunction:`class_exists()` check. This is crucial, as you do not want your
100100
bundle to have a hard dependency on all Doctrine bundles but let the user
101101
decide which to use.
102102

doctrine/registration_form.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ With some validation added, your class may look something like this::
120120
$this->plainPassword = $password;
121121
}
122122

123+
public function getPassword()
124+
{
125+
return $this->password;
126+
}
127+
123128
public function setPassword($password)
124129
{
125130
$this->password = $password;
@@ -180,8 +185,8 @@ Next, create the form for the ``User`` entity::
180185
'type' => 'password',
181186
'first_options' => array('label' => 'Password'),
182187
'second_options' => array('label' => 'Repeat Password'),
183-
)
184-
);
188+
))
189+
;
185190
}
186191

187192
public function configureOptions(OptionsResolver $resolver)

doctrine/resolve_target_entity.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ brevity) to explain how to set up and use the ``ResolveTargetEntityListener``.
3939

4040
A Customer entity::
4141

42-
// src/Acme/AppBundle/Entity/Customer.php
42+
// src/AppBundle/Entity/Customer.php
4343

44-
namespace Acme\AppBundle\Entity;
44+
namespace AppBundle\Entity;
4545

4646
use Doctrine\ORM\Mapping as ORM;
4747
use Acme\CustomerBundle\Entity\Customer as BaseCustomer;
@@ -118,7 +118,7 @@ about the replacement:
118118
orm:
119119
# ...
120120
resolve_target_entities:
121-
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: Acme\AppBundle\Entity\Customer
121+
Acme\InvoiceBundle\Model\InvoiceSubjectInterface: AppBundle\Entity\Customer
122122
123123
.. code-block:: xml
124124
@@ -132,7 +132,7 @@ about the replacement:
132132
<doctrine:config>
133133
<doctrine:orm>
134134
<!-- ... -->
135-
<doctrine:resolve-target-entity interface="Acme\InvoiceBundle\Model\InvoiceSubjectInterface">Acme\AppBundle\Entity\Customer</doctrine:resolve-target-entity>
135+
<doctrine:resolve-target-entity interface="Acme\InvoiceBundle\Model\InvoiceSubjectInterface">AppBundle\Entity\Customer</doctrine:resolve-target-entity>
136136
</doctrine:orm>
137137
</doctrine:config>
138138
</container>
@@ -144,7 +144,7 @@ about the replacement:
144144
'orm' => array(
145145
// ...
146146
'resolve_target_entities' => array(
147-
'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'Acme\AppBundle\Entity\Customer',
147+
'Acme\InvoiceBundle\Model\InvoiceSubjectInterface' => 'AppBundle\Entity\Customer',
148148
),
149149
),
150150
));

0 commit comments

Comments
 (0)