Ooops, ;)

This commit is contained in:
Shoghi Cervantes 2014-02-10 20:46:47 +01:00
parent 5bdb61117f
commit 5057a3965e

View File

@ -95,7 +95,7 @@ abstract class BaseEvent{
static::$handlerPriority = array(); static::$handlerPriority = array();
} }
public function register(callable $handler, $priority = EventPriority::NORMAL){ public static function register(callable $handler, $priority = EventPriority::NORMAL){
if($priority < EventPriority::MONITOR or $priority > EventPriority::LOWEST){ if($priority < EventPriority::MONITOR or $priority > EventPriority::LOWEST){
return false; return false;
} }
@ -112,7 +112,7 @@ abstract class BaseEvent{
} }
} }
public function unregister(callable $handler, $priority = EventPriority::NORMAL){ public static function unregister(callable $handler, $priority = EventPriority::NORMAL){
$identifier = Utils::getCallableIdentifier($handler); $identifier = Utils::getCallableIdentifier($handler);
if(isset(static::$handlers[$identifier])){ if(isset(static::$handlers[$identifier])){
if(isset(static::$handlerPriority[(int) $priority][$identifier])){ if(isset(static::$handlerPriority[(int) $priority][$identifier])){