CHECK THIS OUT

.
Visit Our Official site. Includes entertainment news from Nepal, celebrities, programs, celebrity gossip. Also, Check out the hottest fashion, photos and TV shows! Exclusive from Nepal - We also here by providing you daily news News that covers happenings in Nepal, regional and International arena. The News a mixed standard format covers topics like Politics, Social, Culture, Education,Economy and many more stay tuned.

Friday, 8 April 2016

An Action Helper is a class that plugs into the controller to provide services specific to actions.
The ViewRenderer action helper performs two useful functions for us. Firstly, before our action is called,
it creates a Zend_View object and sets it to the action’s $view property allowing us to assign data to the view
within the action. Secondly, after our action finishes it automatically renders the correct view template into the
response object after the controller action has completed. This ensures that our controller’s action functions
can concentrate on the real work and not on the framework “plumbing”.
What is the “correct view template” though? The ViewRenderer looks for a template file named after the
action with a phtml extension within a folder named after the controller and it looks in the view/scripts
directory for this. This means that for the index action within the index controller, it will look for the view
template file view/scripts/index/index.phtml.
As we noted previously, the response’s body is automatically printed by the front controller, so anything
we assign to the body will be displayed in the browser and hence we do not need to echo ourselves.
Zend_View is the View component of the MVC troika and is a fairly simple PHP based template system.
As we have seen, the assign() function is used to pass variables from the main code body to the template which
can then be used within the view template file.

EVENT OCCUR IN CAPITAL OF NEPAL !

Views:


Category:

CHECK THIS OUT

.