protected function addHandler($type, $name, $handlerName, $priority)
    {
        // If the priority isn't existing we add the priority as 
        // a new array.
        if (!isset($this->handlers[$type][$name][$priority])) {
            $this->handlers[$type][$name][$priority] = array();
            ksort($this->handlers[$type][$name]);
        }
        
        // If we had the event handler already registred, return at this point
        if (in_array($handlerName, $this->handlers[$type][$name][$priority])) {
            return;
        }
        
        // Add the event handler and save the new events array
        $this->handlers[$type][$name][$priority][] = $handlerName;
        $this->saveHandlers();
    }
protected function addHandler($type, $name, $handlerName, $priority)
    {
        // If the priority isn't existing we add the priority as 
        // a new array.
        if (!isset($this->handlers[$type][$name][$priority])) {
            $this->handlers[$type][$name][$priority] = array();
            ksort($this->handlers[$type][$name]);
        }
        
        // If we had the event handler already registred, return at this point
        if (in_array($handlerName, $this->handlers[$type][$name][$priority])) {
            return;
        }
        
        // Add the event handler and save the new events array
        $this->handlers[$type][$name][$priority][] = $handlerName;
        $this->saveHandlers();
    }
protected function addHandler ( $ type , $ name , $ handlerName , $ priority ) { // If the priority isn't existing we add the priority as  // a new array. if ( ! isset ( $ this -> handlers [ $ type ] [ $ name ] [ $ priority ] ) ) { $ this -> handlers [ $ type ] [ $ name ] [ $ priority ] = array ( ) ; ksort ( $ this -> handlers [ $ type ] [ $ name ] ) ; } // If we had the event handler already registred, return at this point if ( in_array ( $ handlerName , $ this -> handlers [ $ type ] [ $ name ] [ $ priority ] ) ) { return ; } // Add the event handler and save the new events array $ this -> handlers [ $ type ] [ $ name ] [ $ priority ] [ ] = $ handlerName ; $ this -> saveHandlers ( ) ; }
Adds a new handler

@access protected
@param string $type
@param string $name
@param string $handlerName
@param integer $priority
Adds a new handler