Created
February 2, 2015 16:32
-
-
Save shmaltorhbooks/2fd89cbd5c9996b1130b to your computer and use it in GitHub Desktop.
define symfony routing as service in symfony DI-container
This file contains hidden or 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
| parameters: | |
| routing.file: 'routing_%core.name%.yml' | |
| routing.cache: | |
| debug: %core.debug% | |
| cache_dir: '%core.cache_path%/routing/' | |
| generator_cache_class: '%core.name%UrlGenerator%core.env%' | |
| matcher_cache_class: '%core.name%UrlMatcher%core.env%' | |
| services: | |
| routing.file_locator: | |
| public: false | |
| class: Symfony\Component\Config\FileLocator | |
| arguments: | |
| - [%core.root_dir%] | |
| routing.file_loader: | |
| public: false | |
| class: Symfony\Component\Routing\Loader\YamlFileLoader | |
| arguments: | |
| - @routing.file_locator | |
| routing.request: | |
| public: false | |
| class: Symfony\Component\HttpFoundation\Request | |
| factory: [@request_stack, 'getCurrentRequest'] | |
| routing.request_context: | |
| public: false | |
| class: Symfony\Component\Routing\RequestContext | |
| calls: | |
| - [ fromRequest, [@routing.request] ] | |
| router: | |
| class: Symfony\Component\Routing\Router | |
| arguments: | |
| - @routing.file_loader | |
| - %routing.file% | |
| - %routing.cache% | |
| - @routing.request_context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment