Hook: switch base namespace checks

This commit is contained in:
Thomas Gelf 2015-11-12 17:58:19 +01:00
parent d903f850da
commit 52159c2627
1 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ use Icinga\Application\Logger;
use Icinga\Exception\ProgrammingError; use Icinga\Exception\ProgrammingError;
/** /**
* Icinga Web Hook registry * Icinga Hook registry
* *
* Modules making use of predefined hooks have to use this registry * Modules making use of predefined hooks have to use this registry
* *
@ -38,7 +38,7 @@ class Hook
* *
* @var string * @var string
*/ */
public static $BASE_NS = 'Icinga\\Web\\Hook\\'; public static $BASE_NS = 'Icinga\\Application\\Hook\\';
/** /**
* Append this string to base class * Append this string to base class
@ -56,7 +56,7 @@ class Hook
{ {
self::$hooks = array(); self::$hooks = array();
self::$instances = array(); self::$instances = array();
self::$BASE_NS = 'Icinga\\Web\\Hook\\'; self::$BASE_NS = 'Icinga\\Application\\Hook\\';
} }
/** /**
@ -149,7 +149,7 @@ class Hook
} else { } else {
$base_class = 'Icinga\\Module\\' $base_class = 'Icinga\\Module\\'
. ucfirst($module) . ucfirst($module)
. '\\Web\\Hook\\' . '\\Hook\\'
. ucfirst($name) . ucfirst($name)
. $suffix; . $suffix;
} }
@ -205,7 +205,7 @@ class Hook
* @param string $name One of the predefined hook names * @param string $name One of the predefined hook names
* @param string $key The identifier of a specific subtype * @param string $key The identifier of a specific subtype
* @param string $class Your class name, must inherit one of the * @param string $class Your class name, must inherit one of the
* classes in the Icinga/Web/Hook folder * classes in the Icinga/Application/Hook folder
*/ */
public static function register($name, $key, $class) public static function register($name, $key, $class)
{ {