framework/basic/RouteHandler.php
public static function parseRoute($url)
    {
        $result = null;

        $parts = explode('/', trim($url, '/'));
        if (count($parts) === 1) {
            $parts[0] = $parts[0] === '' ? self::DEFAULT_CONTROLLER : $parts[0];
            $parts[1] = self::DEFAULT_ACTION;
        }

        $action                   = static::preparePart(array_pop($parts), true);
        $parts[count($parts) - 1] = static::preparePart($parts[count($parts) - 1]).'Controller';
        $controller               = '\\project\\controllers\\'.implode('\\',
                $parts);

        if ($action != '' && $controller != '') {
            $result = $controller.'::'.$action;
        }

        return $result;
    }
public static function parseRoute($url)
    {
        $result = null;

        $parts = explode('/', trim($url, '/'));
        if (count($parts) === 1) {
            $parts[0] = $parts[0] === '' ? self::DEFAULT_CONTROLLER : $parts[0];
            $parts[1] = self::DEFAULT_ACTION;
        }

        $action                   = static::preparePart(array_pop($parts), true);
        $parts[count($parts) - 1] = static::preparePart($parts[count($parts) - 1]).'Controller';
        $controller               = '\\project\\controllers\\'.implode('\\',
                $parts);

        if ($action != '' && $controller != '') {
            $result = $controller.'::'.$action;
        }

        return $result;
    }
public static function parseRoute ( $ url ) { $ result = null ; $ parts = explode ( '/' , trim ( $ url , '/' ) ) ; if ( count ( $ parts ) === 1 ) { $ parts [ 0 ] = $ parts [ 0 ] === '' ? self :: DEFAULT_CONTROLLER : $ parts [ 0 ] ; $ parts [ 1 ] = self :: DEFAULT_ACTION ; } $ action = static :: preparePart ( array_pop ( $ parts ) , true ) ; $ parts [ count ( $ parts ) - 1 ] = static :: preparePart ( $ parts [ count ( $ parts ) - 1 ] ) . 'Controller' ; $ controller = '\\project\\controllers\\' . implode ( '\\' , $ parts ) ; if ( $ action != '' && $ controller != '' ) { $ result = $ controller . '::' . $ action ; } return $ result ; }
Parse url to callable

@param string $url
@return string
Parse url to callable