I need to create a script that will run on the command line using PHP and I want to take advantage of the ZF and the models (classes) I have written using it. How do I do this as elegantly as possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to duplicate the code of public/index.php without calling the run method of Zend_Application (which does the MVC stuff) and load only the resources that you need.
Take care of adapt this to the location of your cli script.