diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-10-07 23:09:13 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-10-08 14:15:44 +0200 |
commit | 403c647b9e84640977ca0f98d21d15ceb4957bdb (patch) | |
tree | 43ef25beb7444ee2f49f5a814f51b0f268b7bb2e /phpBB/config/default/container/services_routing.yml | |
parent | 82743c792287a1efe906c231df7d22dadc8bedcd (diff) | |
download | forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.gz forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.bz2 forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.tar.xz forums-403c647b9e84640977ca0f98d21d15ceb4957bdb.zip |
[ticket/14220] Move route loading to services
PHPBB3-14220
Diffstat (limited to 'phpBB/config/default/container/services_routing.yml')
-rw-r--r-- | phpBB/config/default/container/services_routing.yml | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/phpBB/config/default/container/services_routing.yml b/phpBB/config/default/container/services_routing.yml index ec5ccd3b89..12fc98ce74 100644 --- a/phpBB/config/default/container/services_routing.yml +++ b/phpBB/config/default/container/services_routing.yml @@ -3,11 +3,11 @@ services: class: phpbb\routing\router arguments: - @service_container - - @filesystem + - @routing.chained_resources_locator + - @routing.delegated_loader - %core.root_path% - %core.php_ext% - %core.environment% - - @ext.manager router.listener: class: Symfony\Component\HttpKernel\EventListener\RouterListener @@ -29,3 +29,52 @@ services: - @filesystem - %core.root_path% - %core.php_ext% + +# ---- Route loaders ---- + + routing.delegated_loader: + class: Symfony\Component\Config\Loader\DelegatingLoader + arguments: + - @routing.resolver + + routing.resolver: + class: phpbb\routing\loader_resolver + arguments: + - @routing.loader.collection + + routing.loader.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: routing.loader } + + routing.loader.yaml: + class: Symfony\Component\Routing\Loader\YamlFileLoader + arguments: + - @file_locator + tags: + - { name: routing.loader } + +# ---- Resources Locators ---- + + routing.chained_resources_locator: + class: phpbb\routing\resources_locator\chained_resources_locator + arguments: + - @routing.resources_locator.collection + + routing.resources_locator.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: routing.resources_locator } + + routing.resources_locator.default: + class: phpbb\routing\resources_locator\default_resources_locator + arguments: + - %core.root_path% + - %core.environment% + - @ext.manager + tags: + - { name: routing.resources_locator } |