Le 21/08/2011 13:14, avanwieringen a écrit :
I was looking at the AsseticBundle and was interested how and when the
AsseticLoader was called. I looked for ages through the code and found
the controller.xml in the AsseticBundle config files that contains a
'assetic.routing_loader.class' entry but I have no clue when this is
used. It seems that it is not used anywhere in the complete Standard
Edition source code, except in a few Tests. I have noticed that all
the Loaders for RouteCollections are in separate Routing folders in
their respective bundles. Does this have anything to do with it, e.g.:
Are they automatically resolved when they are placed in those
directories?
What I actually mean is that I want to know:
1) When is the controller.xml file used?
This file is loaded by the DI extension of the bundle to build the
container.
2) When is the AsseticLoader (or any other Loader that returns a
RouteCollection) called?
All services tagged with the /routing.loader/ tag are injected in the
router (well, in a special loader that is injected). And then, for each
routing resource that need to be loaded, this special loader will loop
over the loaders by asking them if they support the resource (they
receive both the resource and the type to decide, and for instance the
core XmlFileLoader accepts reources that end with /.xml/ if the type is
/'xml'/ or /null/) until one returns true. And then, it uses this
loader, or throw an exception if all loaders rejected it.
--
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 symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en