<?php
namespace wcf\system\event;
use wcf\system\cache\builder\EventListenerCacheBuilder;
-use wcf\system\event\listener\IEventListener;
+use wcf\system\event\listener\IParameterizedEventListener;
use wcf\system\event\IEventListener as ILegacyEventListener;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
if (!class_exists($action['listenerClassName'])) {
throw new SystemException("Unable to find class '".$action['listenerClassName']."'");
}
- if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\listener\IEventListener')) {
+ if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\listener\IParameterizedEventListener')) {
// legacy event listeners
if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) {
- throw new SystemException("'".$action['listenerClassName']."' does not implement 'wcf\system\event\listener\IEventListener'");
+ throw new SystemException("'".$action['listenerClassName']."' does not implement 'wcf\system\event\listener\IParameterizedEventListener'");
}
}
// execute actions
foreach ($this->inheritedActionsObjects[$name] as $actionObj) {
- if ($actionObj instanceof IEventListener) {
+ if ($actionObj instanceof IParameterizedEventListener) {
$actionObj->execute($eventObj, $className, $eventName, $parameters);
if (!is_array($parameters)) {
if (!class_exists($action['listenerClassName'])) {
throw new SystemException("Unable to find class '".$action['listenerClassName']."'");
}
- if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\listener\IEventListener')) {
+ if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\listener\IParameterizedEventListener')) {
// legacy event listeners
if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) {
- throw new SystemException("'".$action['listenerClassName']."' does not implement 'wcf\system\event\listener\IEventListener'");
+ throw new SystemException("'".$action['listenerClassName']."' does not implement 'wcf\system\event\listener\IParameterizedEventListener'");
}
}
// execute actions
foreach ($this->actionsObjects[$name] as $actionObj) {
- if ($actionObj instanceof IEventListener) {
+ if ($actionObj instanceof IParameterizedEventListener) {
$actionObj->execute($eventObj, $className, $eventName, $parameters);
if (!is_array($parameters)) {
* *DEPRECATED*
* EventListeners can be registered for a specific event in many controller objects.
*
- * @deprecated since 2.1, use \wcf\system\event\listener\IEventListener
+ * @deprecated since 2.1, use \wcf\system\event\listener\IParameterizedEventListener
* @author Marcel Werk
* @copyright 2001-2014 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+++ /dev/null
-<?php
-namespace wcf\system\event\listener;
-
-/**
- * EventListeners can be registered for a specific event in many controller objects.
- *
- * @author Tim Duesterhus, Marcel Werk
- * @copyright 2001-2014 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.event.listener
- * @category Community Framework
- */
-interface IEventListener {
- /**
- * Executes this action.
- *
- * @param object $eventObj Object firing the event
- * @param string $className class name of $eventObj
- * @param string $eventName name of the event fired
- * @param array &$parameters given parameters
- */
- public function execute($eventObj, $className, $eventName, array &$parameters);
-}
--- /dev/null
+<?php
+namespace wcf\system\event\listener;
+
+/**
+ * EventListeners can be registered for a specific event in many controller objects.
+ * NOTE: This class will be aliased to \wcf\system\event\listener\IEventListener in
+ * a future version. It is named IParameterizedEventListener for backwards
+ * compatibility reasons only.
+ *
+ * @author Tim Duesterhus, Marcel Werk
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.event.listener
+ * @category Community Framework
+ */
+interface IParameterizedEventListener {
+ /**
+ * Executes this action.
+ *
+ * @param object $eventObj Object firing the event
+ * @param string $className class name of $eventObj
+ * @param string $eventName name of the event fired
+ * @param array &$parameters given parameters
+ */
+ public function execute($eventObj, $className, $eventName, array &$parameters);
+}
* @subpackage system.event.listener
* @category Community Framework
*/
-class PreParserAtUserListener implements IEventListener {
+class PreParserAtUserListener implements IParameterizedEventListener {
/**
- * @see \wcf\system\event\listener\IEventListener::execute()
+ * @see \wcf\system\event\listener\IParameterizedEventListener::execute()
*/
public function execute($eventObj, $className, $eventName, array &$parameters) {
if (!$eventObj->text) return;
* @subpackage system.event.listener
* @category Community Framework
*/
-class SessionAccessLogListener implements IEventListener {
+class SessionAccessLogListener implements IParameterizedEventListener {
/**
- * @see \wcf\system\event\listener\IEventListener::execute()
+ * @see \wcf\system\event\listener\IParameterizedEventListener::execute()
*/
public function execute($eventObj, $className, $eventName, array &$parameters) {
if (WCF::getUser()->userID && WCF::getSession()->getPermission('admin.general.canUseAcp') && !defined(get_class($eventObj).'::DO_NOT_LOG')) {