diff options
author | Nils Adermann <naderman@naderman.de> | 2013-09-10 14:01:09 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2013-09-16 00:25:27 +0200 |
commit | b95fdacdd378877d277e261465da73deb06e50da (patch) | |
tree | 01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/phpbb/di/pass | |
parent | 196e1813cd37c47965eb6f254ce6a55210a1b751 (diff) | |
download | forums-b95fdacdd378877d277e261465da73deb06e50da.tar forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2 forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz forums-b95fdacdd378877d277e261465da73deb06e50da.zip |
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/di/pass')
-rw-r--r-- | phpBB/phpbb/di/pass/collection_pass.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/di/pass/kernel_pass.php | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/phpBB/phpbb/di/pass/collection_pass.php b/phpBB/phpbb/di/pass/collection_pass.php index 63a5c7dfc4..ffc5a41f6d 100644 --- a/phpBB/phpbb/di/pass/collection_pass.php +++ b/phpBB/phpbb/di/pass/collection_pass.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\di\pass; + /** * @ignore */ @@ -23,7 +25,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; * the services tagged with the appropriate name defined in the collection's * service_collection tag. */ -class phpbb_di_pass_collection_pass implements CompilerPassInterface +class collection_pass implements CompilerPassInterface { /** * Modify the container before it is passed to the rest of the code diff --git a/phpBB/phpbb/di/pass/kernel_pass.php b/phpBB/phpbb/di/pass/kernel_pass.php index a701ebcfa6..6a9124ad78 100644 --- a/phpBB/phpbb/di/pass/kernel_pass.php +++ b/phpBB/phpbb/di/pass/kernel_pass.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\di\pass; + /** * @ignore */ @@ -18,7 +20,7 @@ if (!defined('IN_PHPBB')) use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -class phpbb_di_pass_kernel_pass implements CompilerPassInterface +class kernel_pass implements CompilerPassInterface { /** * Modify the container before it is passed to the rest of the code @@ -38,12 +40,12 @@ class phpbb_di_pass_kernel_pass implements CompilerPassInterface if (!isset($event['event'])) { - throw new InvalidArgumentException(sprintf('Service "%1$s" must define the "event" attribute on "kernel.event_listener" tags.', $id)); + throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "event" attribute on "kernel.event_listener" tags.', $id)); } if (!isset($event['method'])) { - throw new InvalidArgumentException(sprintf('Service "%1$s" must define the "method" attribute on "kernel.event_listener" tags.', $id)); + throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "method" attribute on "kernel.event_listener" tags.', $id)); } $definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority)); @@ -55,11 +57,11 @@ class phpbb_di_pass_kernel_pass implements CompilerPassInterface // We must assume that the class value has been correctly filled, even if the service is created by a factory $class = $container->getDefinition($id)->getClass(); - $refClass = new ReflectionClass($class); + $refClass = new \ReflectionClass($class); $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; if (!$refClass->implementsInterface($interface)) { - throw new InvalidArgumentException(sprintf('Service "%1$s" must implement interface "%2$s".', $id, $interface)); + throw new \InvalidArgumentException(sprintf('Service "%1$s" must implement interface "%2$s".', $id, $interface)); } $definition->addMethodCall('addSubscriberService', array($id, $class)); |