Skip to content

Commit

Permalink
Merge pull request #1716 from richardmiller/adding_notes_on_framework…
Browse files Browse the repository at this point in the history
…_differences

Adding some notes on differences when using the full stack framework to ...
  • Loading branch information
weaverryan committed Sep 18, 2012
2 parents f08f0a8 + 042ed30 commit aacdeaa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
11 changes: 11 additions & 0 deletions components/dependency_injection/compilation.rst
Expand Up @@ -275,6 +275,12 @@ will then be called when the container is compiled::
$container = new ContainerBuilder();
$container->addCompilerPass(new CustomCompilerPass);

.. note::

Compiler passes are registered differently is you are using the full
stack framework, see :doc:`cookbook/service_container/compiler_passes`
for more details.

Controlling the Pass Ordering
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -418,3 +424,8 @@ constructor argument. When the cache is not in debug mode the cached container
will always be used if it exists. In debug mode, an additional metadata file
is written with the timestamps of all the resource files. These are then checked
to see if the files have changed, if they have the cache will be considered stale.

.. note::

In the full stack framework the compilation and caching of the container
is taken care of for you.
12 changes: 9 additions & 3 deletions components/dependency_injection/tags.rst
Expand Up @@ -158,10 +158,16 @@ run when the container is compiled::
$container = new ContainerBuilder();
$container->addCompilerPass(new TransportCompilerPass);

.. note::

Compiler passes are registered differently is you are using the full
stack framework, see :doc:`cookbook/service_container/compiler_passes`
for more details.

Adding additional attributes on Tags
------------------------------------

Sometimes you need additional information about each service that's tagged with your tag.
Sometimes you need additional information about each service that's tagged with your tag.
For example, you might want to add an alias to each TransportChain.

To begin with, change the ``TransportChain`` class::
Expand Down Expand Up @@ -212,7 +218,7 @@ To answer this, change the service declaration:
class: \Swift_SendmailTransport
tags:
- { name: acme_mailer.transport, alias: bar }
.. code-block:: xml
Expand All @@ -224,7 +230,7 @@ To answer this, change the service declaration:
<service id="acme_mailer.transport.sendmail" class="\Swift_SendmailTransport">
<tag name="acme_mailer.transport" alias="bar" />
</service>
Notice that you've added a generic ``alias`` key to the tag. To actually
use this, update the compiler::

Expand Down

0 comments on commit aacdeaa

Please sign in to comment.