From the CLI docs (https://docs.phalcon.io/en/latest/reference/cli.html) it seems like the array I have to pass to Console::handle() is in this format:
array(
"task" => "email",
"action" => "main",
"params" => array(
0 => "1"
1 => "test"
),
)
But the second parameter is never passed to the task, and the first parameter is of type array. What i'm actually using is this format:
array(
"task" => "email",
"action" => "main",
0 => "1",
1 => "test",
)
using this code:
$arguments = array();
foreach ($argv as $k => $arg)
{
if ($k == 1)
$arguments['task'] = $arg;
else if ($k == 2)
$arguments['action'] = $arg;
else if ($k >= 3)
$arguments[] = $arg;
}
Are the docs referring to an old way of passing parameter? I'm using 1.3.0 atm
Looking at the 2.0 router.zep it seems like the "task" and "action" array keys are unset leaving the whole array as params.