In Zend Framework 1.8, what is the recommended way to register a new plugin in Zend Framework 1.8?
<?php
/**
* Enter description here...
*
*/
class Wenbert_Controller_Plugin_CheckHasAccess extends Zend_Controller_Plugin_Abstract {
/**
* Enter description here...
*
* @param Zend_Controller_Request_Abstract $request
*/
public function preDispatch(Zend_Controller_Request_Abstract $request) {
echo 'This plugin is called...';
}
}
I remember doing something like this in versions prior to 1.8:
require_once 'Wenbert/Controller/Plugin/CheckHasAccess.php';
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new Wenbert_Controller_Plugin_CheckHasAccess());
What would be the best / recommended way to do it in ZF 1.8?
Thanks in advance!
-Wenbert