public static function get()
    {
        if (self::$current !== null) {
            return self::$current;
        }

        $resp = 404;

        $args = array();

        $routes = parent::$httpRoutes;
        $path = \UtilsPath();
        $method = $_SERVER['REQUEST_METHOD'];

        //...
        if (isset($routes[$path])) {
            $verbs = $routes[$path];
        } else {
            foreach ($routes as $route => $actions) {
                if (parent::find($route, $path, $args)) {
                    $verbs = $actions;
                    break;
                }
            }
        }

        if (isset($verbs[$method])) {
            $resp = $verbs[$method];
        } elseif (isset($verbs['ANY'])) {
            $resp = $verbs['ANY'];
        } elseif (isset($verbs)) {
            $resp = 405;
        }

        if (is_numeric($resp)) {
            self::$current = $resp;
        } else {
            self::$current = array(
                'callback' => $resp, 'args' => $args
            );
        }

        $routes = null;

        return self::$current;
    }
public static function get()
    {
        if (self::$current !== null) {
            return self::$current;
        }

        $resp = 404;

        $args = array();

        $routes = parent::$httpRoutes;
        $path = \UtilsPath();
        $method = $_SERVER['REQUEST_METHOD'];

        //...
        if (isset($routes[$path])) {
            $verbs = $routes[$path];
        } else {
            foreach ($routes as $route => $actions) {
                if (parent::find($route, $path, $args)) {
                    $verbs = $actions;
                    break;
                }
            }
        }

        if (isset($verbs[$method])) {
            $resp = $verbs[$method];
        } elseif (isset($verbs['ANY'])) {
            $resp = $verbs['ANY'];
        } elseif (isset($verbs)) {
            $resp = 405;
        }

        if (is_numeric($resp)) {
            self::$current = $resp;
        } else {
            self::$current = array(
                'callback' => $resp, 'args' => $args
            );
        }

        $routes = null;

        return self::$current;
    }
public static function get ( ) { if ( self :: $ current !== null ) { return self :: $ current ; } $ resp = 404 ; $ args = array ( ) ; $ routes = parent :: $ httpRoutes ; $ path = \ UtilsPath ( ) ; $ method = $ _SERVER [ 'REQUEST_METHOD' ] ; //... if ( isset ( $ routes [ $ path ] ) ) { $ verbs = $ routes [ $ path ] ; } else { foreach ( $ routes as $ route => $ actions ) { if ( parent :: find ( $ route , $ path , $ args ) ) { $ verbs = $ actions ; break ; } } } if ( isset ( $ verbs [ $ method ] ) ) { $ resp = $ verbs [ $ method ] ; } elseif ( isset ( $ verbs [ 'ANY' ] ) ) { $ resp = $ verbs [ 'ANY' ] ; } elseif ( isset ( $ verbs ) ) { $ resp = 405 ; } if ( is_numeric ( $ resp ) ) { self :: $ current = $ resp ; } else { self :: $ current = array ( 'callback' => $ resp , 'args' => $ args ) ; } $ routes = null ; return self :: $ current ; }
Get action controller from current route

@return array|bool
Get action controller from current route