2009年6月17日星期三

[fw-mvc] Building a CLI application with Zend_Application

What would be a good approach for providing CLI access to my zend application? For example, I'd like to be able to dispatch mock requests for use in cron jobs:

php mysitecli.php --optimize-search-index

I understand that I can use Zend_Console_Getopt to parse the command line options, but how would I dispatch the request? Should I create an alternate bootstrap specifically for handling CLI requests?

Thanks in advance for the help :)

--
Hector

没有评论: