1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +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\event;
/**
* @ignore
*/
@@ -21,27 +23,27 @@ use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpFoundation\Response;
class phpbb_event_kernel_exception_subscriber implements EventSubscriberInterface
class kernel_exception_subscriber implements EventSubscriberInterface
{
/**
* Template object
* @var phpbb_template
* @var \phpbb\template\template
*/
protected $template;
/**
* User object
* @var phpbb_user
* @var \phpbb\user
*/
protected $user;
/**
* Construct method
*
* @param phpbb_template $template Template object
* @param phpbb_user $user User object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
*/
public function __construct(phpbb_template $template, phpbb_user $user)
public function __construct(\phpbb\template\template $template, \phpbb\user $user)
{
$this->template = $template;
$this->user = $user;
@@ -53,7 +55,7 @@ class phpbb_event_kernel_exception_subscriber implements EventSubscriberInterfac
* @param GetResponseForExceptionEvent $event
* @return null
*/
public function on_kernel_exception(GetResponseForExceptionEvent $event)
public function on_kernel_exception(\GetResponseForExceptionEvent $event)
{
page_header($this->user->lang('INFORMATION'));
@@ -72,7 +74,7 @@ class phpbb_event_kernel_exception_subscriber implements EventSubscriberInterfac
$status_code = $exception instanceof HttpException ? $exception->getStatusCode() : 500;
$response = new Response($this->template->assign_display('body'), $status_code);
$response = new \Response($this->template->assign_display('body'), $status_code);
$event->setResponse($response);
}