/** * The function parses url and add to Route container. * * @static * @access public * @param string $url The URL. */ public static function run($url) { if (count(self::$_links)) { return false; } $Router = new Router(); foreach ($Router->findList(array(), 'Link asc') as $Router) { self::set($Router->Controller, $Router->Link, $Router->Type == Router::PAGE, $Router); } if (!self::getController('/')) { self::set('Controller_Frontend', '/'); } $url = parse_url($url); if (!empty($url['path'])) { self::$_data = explode('/', ltrim(urldecode($url['path']), '/')); } return true; }