This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".  
Status: 2022-10-07

CLI Wrapping


Requesting a route

myMVC serves simple CLI Requests.

You can easily run any route via commandline;

just use the same path/query as in Frontend.

take care to place the request expression into single quotes !

Examples

cd /public;
$ export MVC_ENV="develop"; php index.php '/'
$ export MVC_ENV="develop"; php index.php '/about/'
$ export MVC_ENV="develop"; php index.php '/about/?a={"foo":"bar"}'

Requesting Controller directly; without a route

myMVC allows calling via CLI without any need of a "/route/" (see below "Requesting routes").

Write Parameter separated by spaces.

When adding JSON in a-parameter, encapsulate with single quote '

Example

cd /public;
$ export MVC_ENV="develop"; php index.php module=Foo c=Index m=index a='{"foo":"bar","baz":[1,2,3]}'