diff options
Diffstat (limited to 'phpBB/phpbb/event')
| -rw-r--r-- | phpBB/phpbb/event/data.php | 100 | ||||
| -rw-r--r-- | phpBB/phpbb/event/dispatcher.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/event/extension_subscriber_loader.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/event/kernel_exception_subscriber.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/event/kernel_request_subscriber.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/event/kernel_terminate_subscriber.php | 8 | 
6 files changed, 46 insertions, 94 deletions
diff --git a/phpBB/phpbb/event/data.php b/phpBB/phpbb/event/data.php index 3481023b74..fbb16574ed 100644 --- a/phpBB/phpbb/event/data.php +++ b/phpBB/phpbb/event/data.php @@ -9,62 +9,54 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -    exit; -} -  use Symfony\Component\EventDispatcher\Event;  class data extends Event implements \ArrayAccess  { -    private $data; - -    public function __construct(array $data = array()) -    { -        $this->set_data($data); -    } - -    public function set_data(array $data = array()) -    { -        $this->data = $data; -    } - -    public function get_data() -    { -        return $this->data; -    } - -    /** -     * Returns data filtered to only include specified keys. -     * -     * This effectively discards any keys added to data by hooks. -     */ -    public function get_data_filtered($keys) -    { -        return array_intersect_key($this->data, array_flip($keys)); -    } - -    public function offsetExists($offset) -    { -        return isset($this->data[$offset]); -    } - -    public function offsetGet($offset) -    { -        return isset($this->data[$offset]) ? $this->data[$offset] : null; -    } - -    public function offsetSet($offset, $value) -    { -        $this->data[$offset] = $value; -    } - -    public function offsetUnset($offset) -    { -        unset($this->data[$offset]); -    } +	private $data; + +	public function __construct(array $data = array()) +	{ +		$this->set_data($data); +	} + +	public function set_data(array $data = array()) +	{ +		$this->data = $data; +	} + +	public function get_data() +	{ +		return $this->data; +	} + +	/** +	 * Returns data filtered to only include specified keys. +	 * +	 * This effectively discards any keys added to data by hooks. +	 */ +	public function get_data_filtered($keys) +	{ +		return array_intersect_key($this->data, array_flip($keys)); +	} + +	public function offsetExists($offset) +	{ +		return isset($this->data[$offset]); +	} + +	public function offsetGet($offset) +	{ +		return isset($this->data[$offset]) ? $this->data[$offset] : null; +	} + +	public function offsetSet($offset, $value) +	{ +		$this->data[$offset] = $value; +	} + +	public function offsetUnset($offset) +	{ +		unset($this->data[$offset]); +	}  } diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php index cc3733692e..74b35eb78d 100644 --- a/phpBB/phpbb/event/dispatcher.php +++ b/phpBB/phpbb/event/dispatcher.php @@ -9,14 +9,6 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -	exit; -} -  use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;  /** diff --git a/phpBB/phpbb/event/extension_subscriber_loader.php b/phpBB/phpbb/event/extension_subscriber_loader.php index ab50a589fe..df8e093f4a 100644 --- a/phpBB/phpbb/event/extension_subscriber_loader.php +++ b/phpBB/phpbb/event/extension_subscriber_loader.php @@ -9,14 +9,6 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -	exit; -} -  use Symfony\Component\EventDispatcher\EventDispatcherInterface;  class extension_subscriber_loader diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php index 7003e73b38..8a4de1fbad 100644 --- a/phpBB/phpbb/event/kernel_exception_subscriber.php +++ b/phpBB/phpbb/event/kernel_exception_subscriber.php @@ -9,14 +9,6 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -	exit; -} -  use Symfony\Component\EventDispatcher\EventSubscriberInterface;  use Symfony\Component\HttpKernel\KernelEvents;  use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; diff --git a/phpBB/phpbb/event/kernel_request_subscriber.php b/phpBB/phpbb/event/kernel_request_subscriber.php index a629dd8440..7d5418498b 100644 --- a/phpBB/phpbb/event/kernel_request_subscriber.php +++ b/phpBB/phpbb/event/kernel_request_subscriber.php @@ -9,14 +9,6 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -	exit; -} -  use Symfony\Component\EventDispatcher\EventSubscriberInterface;  use Symfony\Component\HttpKernel\KernelEvents;  use Symfony\Component\HttpKernel\Event\GetResponseEvent; diff --git a/phpBB/phpbb/event/kernel_terminate_subscriber.php b/phpBB/phpbb/event/kernel_terminate_subscriber.php index de441da102..32dba322d1 100644 --- a/phpBB/phpbb/event/kernel_terminate_subscriber.php +++ b/phpBB/phpbb/event/kernel_terminate_subscriber.php @@ -9,14 +9,6 @@  namespace phpbb\event; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ -	exit; -} -  use Symfony\Component\EventDispatcher\EventSubscriberInterface;  use Symfony\Component\HttpKernel\KernelEvents;  use Symfony\Component\HttpKernel\Event\PostResponseEvent;  | 
