public static function set($method, $path, $action)
    {
        if (is_array($method)) {
            foreach ($method as $value) {
                self::set($value, $path, $action);
            }
        } else {
            if (is_string($action)) {
                $action = parent::$prefixNS . $action;
            } elseif ($action !== null && !$action instanceof \Closure) {
                return null;
            }

            $method = strtoupper(trim($method));

            $path = parent::$prefixPath . $path;

            if (!isset(parent::$httpRoutes[$path])) {
                parent::$httpRoutes[$path] = array();
            }

            parent::$httpRoutes[$path][$method] = $action;
        }
    }
public static function set($method, $path, $action)
    {
        if (is_array($method)) {
            foreach ($method as $value) {
                self::set($value, $path, $action);
            }
        } else {
            if (is_string($action)) {
                $action = parent::$prefixNS . $action;
            } elseif ($action !== null && !$action instanceof \Closure) {
                return null;
            }

            $method = strtoupper(trim($method));

            $path = parent::$prefixPath . $path;

            if (!isset(parent::$httpRoutes[$path])) {
                parent::$httpRoutes[$path] = array();
            }

            parent::$httpRoutes[$path][$method] = $action;
        }
    }
public static function set ( $ method , $ path , $ action ) { if ( is_array ( $ method ) ) { foreach ( $ method as $ value ) { self :: set ( $ value , $ path , $ action ) ; } } else { if ( is_string ( $ action ) ) { $ action = parent :: $ prefixNS . $ action ; } elseif ( $ action !== null && ! $ action instanceof \ Closure ) { return null ; } $ method = strtoupper ( trim ( $ method ) ) ; $ path = parent :: $ prefixPath . $ path ; if ( ! isset ( parent :: $ httpRoutes [ $ path ] ) ) { parent :: $ httpRoutes [ $ path ] = array ( ) ; } parent :: $ httpRoutes [ $ path ] [ $ method ] = $ action ; } }
Register or remove a action from controller for a route

@param string|array    $method
@param string          $path
@param string|\Closure $action
@return void
Register or remove a action from controller for a route