2012-04-16 4 views
1

Я включил плагин SecurityCheck.php (Login_Plugin_SecurityCheck) in bootstrap.php. его ошибка ->Call to undefined method Zend_Application::getResource() in Bootstrap.php в строке 9. Ниже мой код.не могут получить доступ к плагину ресурсов

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap 
{ 
protected function _initPlugins() 
    { 

     $bootstrap = $this->getApplication(); 

     $bootstrap->bootstrap('frontcontroller'); 

     $front = $bootstrap->getResource('frontcontroller'); 

     $front->registerPlugin(new Login_Plugin_SecurityCheck()); 
    } 
} 

Как решить эту ошибку.

ответ

0

Попробуйте

protected function _initPlugins() { 
    $this->bootstrap('frontController')->getResource('frontController')->registerPlugin(new Login_Plugin_SecurityCheck()); 

} 

C в FrontController должно быть Captial.

+0

спасибо начинающему, сделанному ........................................... ...... но теперь его выдача ошибки -> Class 'Login_Plugin_SecurityCheck' не найден. Я включил этот плагин в C: \ xampp \ htdocs \ zend \ bin \ zendtest \ application \ plugins – Navdeep

+0

Как принять ответ, я Не знаю, как – Navdeep

+0

http://i.stack.imgur.com/uqJeW.png –

Смежные вопросы