I'm currently trying to get a console route to work with default values
my route is curently configured as:
'console' => array(
'router' => array(
'routes' => array(
'fetch-rapportage' => array(
'options' => array(
'route' => 'rapportage --type= [--hid=]',
'defaults' => array(
'controller' => 'ZetaRapportage\Controller\Test',
'action' => 'generate',
'hid' => false,
)
)
)
)
)
),
Now when i run the following command
cron rapportage --type virtual
the result comes in as expected
object(Zend\Stdlib\Parameters)#96 (1) {
["storage":"ArrayObject":private]=>
array(8) {
[0] => string(10) "rapportage"
[1] => string(6) "--type"
[2] => string(7) "virtual"
["type"] => string(7) "virtual"
["rapportage"] => bool(true)
["controller"] => string(30) "ZetaRapportage\Controller\Test"
["action"] => string(8) "generate"
["hid"] => bool(false)
}
}
Now when i add the optional flag --hid the result is not as expected
command:
cron rapportage --type virtual --hid 100
output
object(Zend\Stdlib\Parameters)#96 (1) {
["storage":"ArrayObject":private]=>
array(10) {
[0] => string(10) "rapportage"
[1] => string(6) "--type"
[2] => string(7) "virtual"
[3] => string(5) "--hid"
[4] => string(3) "100"
["type"] => string(7) "virtual"
["hid"] => bool(false) <-- expected value 100
["rapportage"] => bool(true)
["controller"] => string(30) "ZetaRapportage\Controller\Test"
["action"] => string(8) "generate"
}
}
So i'm currently in "wait-whut!!!"-mode and cant' figure out why and how?!?!? Someone here that can put a finger on the problem