I have created one plugin that is reside in application/controllers/plugin/view.php and below is its content
class Application_Controller_Plugin_View extends Zend_Controller_Plugin_Abstract { public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { $frontController = Zend_Controller_Front::getInstance(); $view = $frontController->getParam('bootstrap')->getResource('view'); echo 'erace'; exit; $view->doctype('XHTML1_STRICT'); $baseUrl = $request->getBaseUrl(); if (defined('RUNNING_FROM_ROOT')) { $baseUrl .= '/public'; $frontController->setBaseUrl($baseUrl); } /* $view->headLink()->appendStylesheet($baseUrl . '/css/main.css'); $view->headLink()->appendStylesheet($baseUrl . '/css/screen.css', 'screen'); $view->headLink()->appendStylesheet($baseUrl . '/css/print.css', 'print');*/ } }
Then I have registered this plugin in bootstrap as follow :
protected function _initLayoutHelper() { $front = Zend_Controller_Front::getInstance(); $front->registerPlugin(new Application_Controller_Plugin_View()); }
but its give me an error like
( ! ) Fatal error: Class 'Application_Controller_Plugin_View' not found in C:\wamp\www\saet_new\application\Bootstrap.php on line 42
Please help me.