コード例 #1
0
ファイル: index.php プロジェクト: sergeycher/routine
function test($name, $route, $method, $action)
{
    $res = Router::dispatch($route, $method);
    if ($action == $res['action']) {
        echo "Test '{$name}' [{$method} {$route}] passed\n";
    } else {
        echo "Test '{$name}' [{$method} {$route}] NOT passed\n";
    }
}
コード例 #2
0
 public static function register(array $routes, array $tokens = null)
 {
     Router::register(static::factory(), $routes, $tokens);
 }