I’m little bit new to Zend, I want to use a controller action through out the entire application automatically, I don’t have a clear idea to how to use it, thought about init() method, action helpers, etc.
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.
Then instead of simply creating controller action create controllerAction Helper . Here you can find more about it
http://framework.zend.com/manual/en/zend.controller.actionhelpers.html
In your bootstrap do
In Response to comment .
It depends upon your ‘code fragment’ , If your code fragment does not required to know nothing about module , controller, action , base url then you can use Bootstrap init function
like
In Response To comment
You can save any instance of your object inside Zend_Registy and retrieve it whereever you like
Inside Bootstrap.php
Later in your view or controller do