Get the current $view from a view helper
By Geoffrey on Sunday 1 July 2007, 22:24 - Coding - Permalink
Tags :
So you're making your own view helper and you need, for a reason, to access the running $view instance. Don't worry, all you have to do is implement a setView() method which will be called on your helper's instantiation, with the $view as argument:
class My_View_Helper_SpecialPurpose {
protected $_view = null;
public function setView($view) {
$this->_view = $view;
}
}
And voila !
no comment
This post's comments feed