Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes and rewordings
  • Loading branch information
javiereguiluz committed Apr 25, 2016
commit d7da32f4e6dce31b239d426c362ced840e7f11c9
14 changes: 7 additions & 7 deletions components/dependency_injection/definitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Class
~~~~~

The first optional argument of the ``Definition`` class is the fully qualified
class name of the object returned when the service is get from the container::
class name of the object returned when the service is fetched from the container::

use Symfony\Component\DependencyInjection\Definition;

Expand All @@ -82,7 +82,7 @@ Constructor Arguments

The second optional argument of the ``Definition`` class is an array with the
arguments passed to the constructor of the object returned when the service is
get from the container::
fetched from the container::

use Symfony\Component\DependencyInjection\Definition;

Expand All @@ -106,15 +106,15 @@ or to get a single argument by its position::
$definition->getArgument($index);
// e.g. $definition->getArgument(0) for the first argument

The argument can be a string, an array, a service parameter by using the
The argument can be a string, an array or a service parameter by using the
``%parameter_name%`` syntax::

$definition->addArgument('%kernel_debug%');

If the argument is another container service, don't use the ``get()`` method to
get the actual service, because it won't be available when defining services.
Instead, use the :class:`Symfony\\Component\\DependencyInjection\\Reference`
class to get a reference to the service available once the service container is
If the argument is another service, don't use the ``get()`` method to fetch it,
because it won't be available when defining services. Instead, use the
:class:`Symfony\\Component\\DependencyInjection\\Reference` class to get a
reference to the service which will be available once the service container is
fully built::

use Symfony\Component\DependencyInjection\Reference;
Expand Down