Respect/Rest — Issue #13: Command line routing and routines
Author: alganet
Created: 2011-10-24 06:52:49+00:00
State: open

We could create a CliRequest that when injected into the Router instead of the traditional Request could route things via Cli calls. Bash and linux are somewhat RESTful. An experimental mocked cli request is in the Router test suite for a long time now, but it isn't very friendly for users.

Considering a `$r->get('/users/*', 'MyUsersController')` sample route, both a `HTTP GET /users/alganet` and a `php application.php get users alganet` cli route should route to the same point. Custom route verbs could be used, such as `$r->install('/', 'MyInstallController');`.

Much of the code from the current Request class would be moved to an AbstractRequest that would be extended to both Request and CliRequest.