index.php
file in the Getting started guide, you'll remember that the method we called to make Cherrycake starting working on the received request actions was Engine:attendWebRequest. When creating an app that works in the command line, the method to use is Engine:attendCliRequest instead, like this:cli.php
file additionally to the index.php
file. This cli.php will look more or less equal to your existing index.php
, but it will call the Engine:attendCliRequest instead of Engine:attendWebRequest method.helloWorldCli
Action, we would call Cherrycake from the Linux command line like this:parameters
array when creating the Request object just like you already did in the Accept GET or POST parameters of the Actions Guide, except this time you use the REQUEST_PARAMETER_TYPE_CLI
parameter type instead of REQUEST_PARAMETER_TYPE_GET
or REQUEST_PARAMETER_TYPE_POST
, like this: