aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/di')
-rw-r--r--phpBB/phpbb/di/extension/config.php6
-rw-r--r--phpBB/phpbb/di/extension/core.php4
-rw-r--r--phpBB/phpbb/di/extension/ext.php4
-rw-r--r--phpBB/phpbb/di/pass/collection_pass.php4
-rw-r--r--phpBB/phpbb/di/pass/kernel_pass.php12
-rw-r--r--phpBB/phpbb/di/service_collection.php4
6 files changed, 23 insertions, 11 deletions
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
index 6c272a6588..85b374a3ca 100644
--- a/phpBB/phpbb/di/extension/config.php
+++ b/phpBB/phpbb/di/extension/config.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\di\extension;
+
/**
* @ignore
*/
@@ -23,7 +25,7 @@ use Symfony\Component\Config\FileLocator;
/**
* Container config extension
*/
-class phpbb_di_extension_config extends Extension
+class config extends Extension
{
public function __construct($config_file)
{
@@ -76,7 +78,7 @@ class phpbb_di_extension_config extends Extension
{
if (preg_match('#^[a-z]+$#', $acm_type))
{
- return 'phpbb_cache_driver_'.$acm_type;
+ return '\\phpbb\cache\driver\\'.$acm_type;
}
return $acm_type;
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 9d59a24b7e..1f6b700973 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\di\extension;
+
/**
* @ignore
*/
@@ -23,7 +25,7 @@ use Symfony\Component\Config\FileLocator;
/**
* Container core extension
*/
-class phpbb_di_extension_core extends Extension
+class core extends Extension
{
/**
* Config path
diff --git a/phpBB/phpbb/di/extension/ext.php b/phpBB/phpbb/di/extension/ext.php
index 7d9b433751..cf623a7c87 100644
--- a/phpBB/phpbb/di/extension/ext.php
+++ b/phpBB/phpbb/di/extension/ext.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\di\extension;
+
/**
* @ignore
*/
@@ -23,7 +25,7 @@ use Symfony\Component\Config\FileLocator;
/**
* Container ext extension
*/
-class phpbb_di_extension_ext extends Extension
+class ext extends Extension
{
protected $paths = array();
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));
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
index 880cb46d4d..fccdd77071 100644
--- a/phpBB/phpbb/di/service_collection.php
+++ b/phpBB/phpbb/di/service_collection.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\di;
+
/**
* @ignore
*/
@@ -22,7 +24,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @package phpBB3
*/
-class phpbb_di_service_collection extends ArrayObject
+class service_collection extends \ArrayObject
{
/**
* Constructor