Hi,
I am trying to use action hlper in index controller and having some problem
with it.
I created action helper in modules/website/action/helpers/Secure.php
class modules_website_action_helpers_Secure extends
Zend_Controller_Action_Helper
{
public function direct()
{
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
$request = $this->getRequest();
$url = 'https://'
. $_SERVER['HTTP_HOST']
. $request->getRequestUri();
$redirector =
Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
$redirector->gotoUrl($url);
}
}
}
Then i registered it with the helper broker in my bootstrap:
Zend_Controller_Action_HelperBroker::addPrefix('modules_website_action_helpers');
and i am calling it in my action in indexcontroller as
$this->_helper->secure();
But iam getting error
Fatal error: Uncaught exception 'Zend_Controller_Action_Exception' with
message 'Action Helper by name Secure not found.' in
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Action/HelperBroker.php:341
Stack trace: #0
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Action/HelperBroker.php(191):
Zend_Controller_Action_HelperBroker::_loadHelper('Secure') #1
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Action/HelperBroker.php(354):
Zend_Controller_Action_HelperBroker->getHelper('secure') #2 [internal
function]: Zend_Controller_Action_HelperBroker->__call('secure', Array) #3
/home/jijo/svn/cm/trunk/code/modules/website/controllers/IndexController.php(220):
Zend_Controller_Action_HelperBroker->secure() #4
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Action.php(502):
Website_IndexController->paymentAction() #5
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Dispatcher/Standard.php(293):
Zend_Controller_Action->dispatch('paymentAction') #6
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Front.p in
/home/jijo/svn/cm/trunk/code/library/Zend/Controller/Action/HelperBroker.php
on line 341
So Please can anybody help me out with these
Thanks
--
View this message in context:
http://www.nabble.com/Action-Helper-Problem-tp19854215p19854215.html
Sent from the Zend Framework mailing list archive at Nabble.com.