src/Common/CodeIgniter/Core/Hooks.php
public function addHook($hookwhere, $hook)
    {
        if (is_array($hook)) {
            if (isset($hook['classref']) && isset($hook['method']) && isset($hook['params'])) {
                if (is_object($hook['classref']) && method_exists($hook['classref'], $hook['method'])) {
                    $this->aCustomHooks[$hookwhere][] = $hook;
                    return true;
                }
            }
        }
        return false;
    }
public function addHook($hookwhere, $hook)
    {
        if (is_array($hook)) {
            if (isset($hook['classref']) && isset($hook['method']) && isset($hook['params'])) {
                if (is_object($hook['classref']) && method_exists($hook['classref'], $hook['method'])) {
                    $this->aCustomHooks[$hookwhere][] = $hook;
                    return true;
                }
            }
        }
        return false;
    }
public function addHook ( $ hookwhere , $ hook ) { if ( is_array ( $ hook ) ) { if ( isset ( $ hook [ 'classref' ] ) && isset ( $ hook [ 'method' ] ) && isset ( $ hook [ 'params' ] ) ) { if ( is_object ( $ hook [ 'classref' ] ) && method_exists ( $ hook [ 'classref' ] , $ hook [ 'method' ] ) ) { $ this -> aCustomHooks [ $ hookwhere ] [ ] = $ hook ; return true ; } } } return false ; }
Adds a particular hook

@param string The hook name
@param array  The hook configuration (classref, method, params)

@return bool
Adds a particular hook