Cli\Router

Class Phalcon\Cli\Router

implements Phalcon\Di\InjectionAwareInterface

Source on GitHub

Phalcon\Cli\Router is the standard framework router. Routing is the process of taking a command-line arguments and decomposing it into parameters to determine which module, task, and action of that task should receive the request

$router = new \Phalcon\Cli\Router();

$router->handle(
    [
        "module" => "main",
        "task"   => "videos",
        "action" => "process",
    ]
);

echo $router->getTaskName();

Methods

登录查看完整内容