I’ve followed the steps to create a Zend Framework 2 application from the skeleton ( http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html )
There also is a very nice tutorial for the ZF2 native console support available
http://framework.zend.com/manual/2.0/en/modules/zend.console.introduction.html
Now the tutorial says:
Let’s assume that we’d like our application to handle the following
command line:
> zf user resetpassword user@mail.com
When a user runs our application (zf) with these parameters, we’d like
to call action resetpassword of Application\IndexController.
Problem is that there is no description available on how to get the script running on CONSOLE ( currently windows ) – there’s no zf or any other executable script in the created folder structure
Any hints?
ideally would be a bin folder in the application root directory which contains a entry-script for each application module
e.g. run a application module called module1
php appfolder/bin/module1.php --verbose
or
php appfolder/bin/cli.php module1 --verbose
I found the solution.
Just like a web-based ZF2 application the entry point is the index.php in appfolder/public
The example app from the tutorial above is called this way
linux wrapper to call zf2 console apps
change into your ZF2 application folder
put this into your app file
Now you should be able to run your app this way