public function addCallback($name, $callback, $prio = 10)
    {
        if (!is_callable($callback)) {
            throw new \Exception("Callback not callable.", 3);
            return false;
        }
        $key = $this->getCallbackKey($callback);
        if (!isset(self::$_baseRealCallbacks[$key])) {
            self::$_baseRealCallbacks[$key] = $callback;
        }

        $this->_callbacks[$name][$prio][] = $key;
        ksort($this->_callbacks[$name]);

        return $this;
    }
public function addCallback($name, $callback, $prio = 10)
    {
        if (!is_callable($callback)) {
            throw new \Exception("Callback not callable.", 3);
            return false;
        }
        $key = $this->getCallbackKey($callback);
        if (!isset(self::$_baseRealCallbacks[$key])) {
            self::$_baseRealCallbacks[$key] = $callback;
        }

        $this->_callbacks[$name][$prio][] = $key;
        ksort($this->_callbacks[$name]);

        return $this;
    }
public function addCallback ( $ name , $ callback , $ prio = 10 ) { if ( ! is_callable ( $ callback ) ) { throw new \ Exception ( "Callback not callable." , 3 ) ; return false ; } $ key = $ this -> getCallbackKey ( $ callback ) ; if ( ! isset ( self :: $ _baseRealCallbacks [ $ key ] ) ) { self :: $ _baseRealCallbacks [ $ key ] = $ callback ; } $ this -> _callbacks [ $ name ] [ $ prio ] [ ] = $ key ; ksort ( $ this -> _callbacks [ $ name ] ) ; return $ this ; }
Adds a callback listener

@param string    $name     the hook name
@param function  $callback
@param integer   $prio     higher means later

return object
Adds a callback listener