1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-20 23:41:29 +02:00

[ticket/11700] Move all recent code to namespaces

PHPBB3-11700
This commit is contained in:
Nils Adermann
2013-09-10 14:01:09 +02:00
parent 196e1813cd
commit b95fdacdd3
420 changed files with 2316 additions and 1840 deletions

View File

@@ -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)
{

View File

@@ -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
{
/**
* phpBB Root path

View File

@@ -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();

View File

@@ -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

View File

@@ -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));

View File

@@ -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