本文整理汇总了PHP中Routes::analizeAndProcessRoutes方法的典型用法代码示例。如果您正苦于以下问题:PHP Routes::analizeAndProcessRoutes方法的具体用法?PHP Routes::analizeAndProcessRoutes怎么用?PHP Routes::analizeAndProcessRoutes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Routes
的用法示例。
在下文中一共展示了Routes::analizeAndProcessRoutes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testLoadRoutesNoAnything
public function testLoadRoutesNoAnything()
{
$_SERVER["QUERY_STRING"] = "";
$routes = new Routes();
$routes->analizeAndProcessRoutes();
$this->assertEquals("Application", $routes->controller);
$this->assertEquals("Index", $routes->action);
}
示例2: Run
public static function Run()
{
Logger::debug("Creating server object", "Server", "Run");
$router = new Routes();
$router->analizeAndProcessRoutes();
if ($router->controller && $router->action) {
Logger::debug("Server controller: [" . $router->controller . "] action: [" . $router->action . "]", "Server", "Run");
$controller = $router->controller;
$app = new $controller();
$app->params = $router->params;
$app->controller = $router->controller;
$app->action = $router->action;
print $app->loadApp();
}
}