Le 04/01/2011 20:19, Gustavo Adrian a écrit :
Then, my questions:

1) Is this the way to create a service that needs to get autoloaded, without import the xml file from the app/config/config.yml? If that's the case, Is this the shortest way to create a new service that gets autoloaded? 2) The getAlias method is the alias to get the service with $this->container->get( $myAlias ) ? 3) Which are the other uses the Extension class has, besides the fact that it gets autoloaded? For example, I saw a lot of other extensions (from some symfony bundles too) and it seems to provide a way to handle defaults for certain configs. 4) Any other point that you can tell me about this topic would be of great help. I saw the Dependency Injection docs (I'll have to see it again to refresh my knowledge :P), and I saw the part of this topic on the symfony 2 docs, but there're a few points that still don't know about it. I know that the documentation will be more and more complete within the next months, but if you can give me a few hints regarding this topic, I'd be very grateful :)
The Extension classes are about creating services in the DIC.
It is the good way to add your own stuff in the DIC and to allow users to configure a bundle by fetching some parameters from the config files (which are then put into the DIC or used to define services)

--
Christophe | Stof

--
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