Skip to content

added docs for PrependExtensionInterface #2007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2012

Conversation

lsmith77
Copy link
Contributor

@lsmith77 lsmith77 commented Dec 7, 2012

see symfony/symfony#5566

most likely the wording needs to be tweaked. i am not sure if the example is clear enough either.


.. code-block:: xml

????
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can someone tell me what i would need to write here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can see, this should be:

<!-- app/config/config.xml -->
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:acme_hello="http://www.example.com/symfony/schema/"
    xsi:schemaLocation="http://www.example.com/symfony/schema/ http://www.example.com/symfony/schema/hello-1.0.xsd">

    <acme_something:config use_acme_goodbye="false">
        <acme_something:entity_manager_name>non_default</acme_something:entity_manager>
    </acme_something:config>

    <acme_other:config use_acme_goodbye="false" />

</container>

------------------------------------------------

An Extension can prepend the configuration of any Bundle before the ``load()``
method is called by implementing ``PrependExtensionInterface``::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

method is called by implementing 
:class:`Symfony\\Component\\DependencyInjection\\Compiler\\PrependExtensionInterface`::

@lsmith77
Copy link
Contributor Author

@johnkary thx, fixed the issue you noted.

}
}

Inside the ``prepend()`` method developers have full access to the ``ContainerBuilder`` instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use the :method syntax to link to the phpdoc of the method

@weaverryan
Copy link
Member

Hey Lukas!

Merged in and a few tweaks made. Thanks for the docs, and nice feature!

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants