public function addRoute($route, $eventName, $priority = 50)
    {
        // If the priority isn't existing we add the priority as 
        // a new array.
        if (!isset($this->routes[$priority])) {
            $this->routes[$priority] = array();
            ksort($this->routes);
        }
        
        // If we had the route already registred, return at this point
        if (isset($this->routes[$priority][$route])) {
            return true;
        }
        
        // Add the route and save the new routes array
        $this->routes[$priority][$route] = $eventName;
        $this->saveRoutes();
        
        return true;
    }
public function addRoute($route, $eventName, $priority = 50)
    {
        // If the priority isn't existing we add the priority as 
        // a new array.
        if (!isset($this->routes[$priority])) {
            $this->routes[$priority] = array();
            ksort($this->routes);
        }
        
        // If we had the route already registred, return at this point
        if (isset($this->routes[$priority][$route])) {
            return true;
        }
        
        // Add the route and save the new routes array
        $this->routes[$priority][$route] = $eventName;
        $this->saveRoutes();
        
        return true;
    }
public function addRoute ( $ route , $ eventName , $ priority = 50 ) { // If the priority isn't existing we add the priority as  // a new array. if ( ! isset ( $ this -> routes [ $ priority ] ) ) { $ this -> routes [ $ priority ] = array ( ) ; ksort ( $ this -> routes ) ; } // If we had the route already registred, return at this point if ( isset ( $ this -> routes [ $ priority ] [ $ route ] ) ) { return true ; } // Add the route and save the new routes array $ this -> routes [ $ priority ] [ $ route ] = $ eventName ; $ this -> saveRoutes ( ) ; return true ; }
Adds an event handler for the given event.

@access public
@param string $route
@param string $eventName
@param integer $priority
@return boolean
Adds an event handler for the given event .