public function registerHook(IHookProvider $prov, $moduleName, $loadBefore = null) {
        $found = false;

        if(is_a($prov, '\\pff\\Iface\\IBeforeHook')) {
            $found = $this->addHook($this->_beforeController, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IAfterHook')) {
            $found = $this->addHook($this->_afterController, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IBeforeSystemHook')) {
            $found = $this->addHook($this->_beforeSystem, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IBeforeViewHook')) {
            $found = $this->addHook($this->_beforeView, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IAfterViewHook')) {
            $found = $this->addHook($this->_afterView, $prov, $moduleName, $loadBefore);
        }

        if(!$found) {
            throw new HookException("Cannot add given class as a hook provider: ". get_class($prov));
        }
    }
public function registerHook(IHookProvider $prov, $moduleName, $loadBefore = null) {
        $found = false;

        if(is_a($prov, '\\pff\\Iface\\IBeforeHook')) {
            $found = $this->addHook($this->_beforeController, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IAfterHook')) {
            $found = $this->addHook($this->_afterController, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IBeforeSystemHook')) {
            $found = $this->addHook($this->_beforeSystem, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IBeforeViewHook')) {
            $found = $this->addHook($this->_beforeView, $prov, $moduleName, $loadBefore);
        }

        if(is_a($prov, '\\pff\\Iface\\IAfterViewHook')) {
            $found = $this->addHook($this->_afterView, $prov, $moduleName, $loadBefore);
        }

        if(!$found) {
            throw new HookException("Cannot add given class as a hook provider: ". get_class($prov));
        }
    }
public function registerHook ( IHookProvider $ prov , $ moduleName , $ loadBefore = null ) { $ found = false ; if ( is_a ( $ prov , '\\pff\\Iface\\IBeforeHook' ) ) { $ found = $ this -> addHook ( $ this -> _beforeController , $ prov , $ moduleName , $ loadBefore ) ; } if ( is_a ( $ prov , '\\pff\\Iface\\IAfterHook' ) ) { $ found = $ this -> addHook ( $ this -> _afterController , $ prov , $ moduleName , $ loadBefore ) ; } if ( is_a ( $ prov , '\\pff\\Iface\\IBeforeSystemHook' ) ) { $ found = $ this -> addHook ( $ this -> _beforeSystem , $ prov , $ moduleName , $ loadBefore ) ; } if ( is_a ( $ prov , '\\pff\\Iface\\IBeforeViewHook' ) ) { $ found = $ this -> addHook ( $ this -> _beforeView , $ prov , $ moduleName , $ loadBefore ) ; } if ( is_a ( $ prov , '\\pff\\Iface\\IAfterViewHook' ) ) { $ found = $ this -> addHook ( $ this -> _afterView , $ prov , $ moduleName , $ loadBefore ) ; } if ( ! $ found ) { throw new HookException ( "Cannot add given class as a hook provider: " . get_class ( $ prov ) ) ; } }
Registers a hook provider

@param IHookProvider $prov Hook provider (module)
@param string $moduleName Name of the module
@param string|null $loadBefore Hook must be run before specified module name
@throws HookException
Registers a hook provider