Created
February 8, 2012 19:26
-
-
Save Thinkscape/1772600 to your computer and use it in GitHub Desktop.
Conceptual description of zf2 AssetManager event-driven inter-module workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) AssetManager module init(): register "resources.collectPath" event with Mod.Manager | |
2) Other modules' init(): attach listener to "resources.collectPath" | |
3) Application runs... | |
4) $this->locator->assetManager->injectCSS(); | |
5) AssetManager: $events->trigger("resources.collectPath"). | |
6) listeners in modules do: $r = $event->getTarget(); $r[] = __DIR__ .'/css/main.css" | |
7) AssetManager: receives a whole collection of paths | |
8) AssetManager: merge, minify, output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment