Exemplo n.º 1
0
 /**
  * 设置路由器默认配置
  *
  * @access public
  * @param mixed $routes 配置信息
  * @return void
  */
 public static function setRoutes($routes)
 {
     /** 载入路由解析支持 */
     require_once 'Typecho/Router/Parser.php';
     if (isset($routes[0])) {
         self::$_routingTable = $routes[0];
     } else {
         /** 解析路由配置 */
         $parser = new Typecho_Router_Parser($routes);
         self::$_routingTable = $parser->parse();
     }
 }
Exemplo n.º 2
0
 /**
  * 设置路由器默认配置
  *
  * @access public
  * @param mixed $routes 配置信息
  * @return void
  */
 public static function setRoutes($routes)
 {
     if (isset($routes[0])) {
         self::$_routingTable = $routes[0];
     } else {
         /** 解析路由配置 */
         $parser = new Typecho_Router_Parser($routes);
         self::$_routingTable = $parser->parse();
     }
 }