Skip to content

Commit

Permalink
Update tags.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0NL committed Oct 3, 2017
1 parent 71158f8 commit 0aaf48b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service_container/tags.rst
Expand Up @@ -468,14 +468,14 @@ constructor argument to the ``App\HandlerCollection`` service:
$container->register(\App\Handler\One::class)
->addTag('app.handler');
$container->register(\App\Handler\One::class)
$container->register(\App\Handler\Two::class)
->addTag('app.handler');
$container->register(\App\HandlerCollection::class)
// inject all services tagged with app.handler as first argument
->addArgument(new TaggedIteratorArgument('app.handler'));
After compilation the `HandlerCollection` service is able to iterate over your application handlers.
After compilation the ``HandlerCollection`` service is able to iterate over your application handlers.

.. code-block:: php
Expand Down

0 comments on commit 0aaf48b

Please sign in to comment.