I am new to Zend Framework. 1st things 1st, I want to change that .phtml
extention to .php
in the views.
After researching, I found that this code works, in the init method of different controllers:
$this->getHelper('viewRenderer')->setViewSuffix('php');
Problem is that I have to repeat that code in every controller, which is something bad and defeats the purpose of using a framework.
I could have subclassed the Zend_Controller_Action
into some base controller with all the shared code which all other controllers can inherit from, but as far as I know, it's not the best practice to do.
How can I achieve the shared code without subclassing the Zend_Controller_Action
class and without using any plugins or Action helpers
Thanks in advance.