[icinga-checkins] icinga.org: icingaweb2/bugfix/hooks-don-t-respect-module-permissions-12396 : Module: Drop deprecated method registerHook and arg $key of method provideHook

git at icinga.org git at icinga.org
Fri Nov 11 16:16:16 CET 2016


Module: icingaweb2
Branch: bugfix/hooks-don-t-respect-module-permissions-12396
Commit: f1a1f411922f993e53780f5b5f3b17fc425814b1
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=f1a1f411922f993e53780f5b5f3b17fc425814b1

Author: Johannes Meyer <johannes.meyer at netways.de>
Date:   Fri Nov 11 16:15:59 2016 +0100

Module: Drop deprecated method registerHook and arg $key of method provideHook


---

 library/Icinga/Application/Modules/Module.php |   20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php
index de40266..b5eafbd 100644
--- a/library/Icinga/Application/Modules/Module.php
+++ b/library/Icinga/Application/Modules/Module.php
@@ -1242,22 +1242,6 @@ class Module
         return $this->includeScript($this->configScript);
     }
 
-    /**
-     * Register a hook
-     *
-     * @param   string  $name   Name of the hook
-     * @param   string  $class  Class of the hook w/ namespace
-     * @param   string  $key
-     *
-     * @return  $this
-     *
-     * @deprecated              Deprecated in favor of {@link provideHook()}. Will be removed in version 2.2.0
-     */
-    protected function registerHook($name, $class, $key = null)
-    {
-        return $this->provideHook($name, $class, $key);
-    }
-
     protected function slashesToNamespace($class)
     {
         $list = explode('/', $class);
@@ -1275,12 +1259,10 @@ class Module
      * @param   string  $implementation [optional] Fully qualified name of the class providing the hook implementation.
      *                                  Defaults to the module's ProvidedHook namespace plus the hook's name for the
      *                                  class name. Web 2's namespace separator is \\ (double backslash) at the moment
-     * @param   string  $key            No-op arg for compatibility reasons. This argument is deprecated and will be
-     *                                  removed in version 2.2.0
      *
      * @return  $this
      */
-    protected function provideHook($name, $implementation = null, $key = null)
+    protected function provideHook($name, $implementation = null)
     {
         if ($implementation === null) {
             $implementation = $name;



More information about the icinga-checkins mailing list