I believe you could just override the base registerExtensions() method in
your Bundle class and load your file right into the container.  Per its PHP
docs:

    Override this method if your DIC extensions do not follow the
conventions:
     * Extensions are in the 'DependencyInjection/' sub-directory
     * Extension class names ends with 'Extension'

If your bundle doesn't have an extension file, that sounds like it's not
following conventions :)

This would also remove the need for the developer to add the full path to
their config's imports section.

On Tue, Feb 8, 2011 at 3:08 AM, ryan weaver <[email protected]> wrote:

> Hey guys-
>
> I may have just missed the easy answer - so I appreciate the help in
> advance.
>
> Most end-user bundles will have a DI resource or two and will just import
> them from the main application configuration resource (without the need for
> any DI extension class). This is similar to what you see already commonly
> with routing.
>
> But what is the syntax for this? The routing has a "@BundleName/..."
> syntax, but that doesn't appear to be true for the DI configuration.
> Currently, I'm using the following:
>
> imports:
>     hello_bundle:
>         resource:
> ../../src/Sensio/HelloBundle/Resources/config/services.yml
>
> Am I missing the better solution?
>
> Thanks!
>
> Ryan Weaver
> Lead Programmer - iostudio - Nashville, TN
> http://www.iostudio.com
> http://www.thatsquality.com
> Twitter: @weaverryan
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>



-- 
jeremy mikola

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to