Это можно сделать, например, в bootstrap:
Zend_Controller_Action_HelperBroker::addPath( APPLICATION_PATH .'/controllers/helpers');2. Пишем хелпер application/controllers/helpers/Myhelper.php:
class Zend_Controller_Action_Helper_Myhelper extends Zend_Controller_Action_Helper_Abstract { function direct() { return __METHOD__; } function another() { return __METHOD__; } }3. Вызываем хелпер в контроллере:
class IndexController extends Zend_Controller_Action { public function indexAction() { echo $this->_helper->myhelper(); echo $this->_helper->myhelper->another(); die; } }
Комментариев нет:
Отправить комментарий