diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-06-24 13:08:19 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-06-24 13:08:19 +0200 |
commit | a91c4e4f96309401f2e1a7a05ccadc876781298e (patch) | |
tree | cb7183524d389f01de45d7b3d53721e7c74fc10d /phpBB/phpbb/di/pass/collection_pass.php | |
parent | 9dbd8f4f9b1c8a9edd0d1734c2c61b7360d54836 (diff) | |
download | forums-a91c4e4f96309401f2e1a7a05ccadc876781298e.tar forums-a91c4e4f96309401f2e1a7a05ccadc876781298e.tar.gz forums-a91c4e4f96309401f2e1a7a05ccadc876781298e.tar.bz2 forums-a91c4e4f96309401f2e1a7a05ccadc876781298e.tar.xz forums-a91c4e4f96309401f2e1a7a05ccadc876781298e.zip |
[ticket/13961] Add ordered service collection
PHPBB3-13961
Diffstat (limited to 'phpBB/phpbb/di/pass/collection_pass.php')
-rw-r--r-- | phpBB/phpbb/di/pass/collection_pass.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/phpbb/di/pass/collection_pass.php b/phpBB/phpbb/di/pass/collection_pass.php index a5c054674e..ccc1250c20 100644 --- a/phpBB/phpbb/di/pass/collection_pass.php +++ b/phpBB/phpbb/di/pass/collection_pass.php @@ -37,7 +37,16 @@ class collection_pass implements CompilerPassInterface foreach ($container->findTaggedServiceIds($data[0]['tag']) as $service_id => $service_data) { - $definition->addMethodCall('add', array($service_id)); + if (substr($definition->getClass(), -strlen('ordered_service_collection')) === 'ordered_service_collection') + { + $arguments = array($service_id, $service_data[0]['order']); + } + else + { + $arguments = array($service_id); + } + + $definition->addMethodCall('add', $arguments); } } } |