hi i am a newbie in zend frame work.. pls help mee i am going through a registration module. and in that module there is separate helper file called Tools for calculating age... date comparison etc while trying to create object of Users_View_Helper_Tools in indexAction getting a fattal error of Users_View_Helper_Tools not found how will will we autoload the helper files in the modules
A:
To add a helper path, use addHelperPath(); the docs will help you:
http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.paths
Ashley
2010-09-06 09:32:30
A:
In bootstrap:
Zend_Controller_Action_HelperBroker::addPath(
'Path/To/Where/Your/Helper/Is',
'Path_To_Where_Your_Helper_Is'
);
In controller:
$this->_helper->myHelper();
The helper would look like this:
class Path_To_Where_Your_Helper_Is_MyHelper extends Zend_Controller_Action_Helper_Abstract
{
public function direct()
{
echo 'Hello';
}
}
Richard Knop
2010-09-07 09:48:13