
Untitled
By: a guest on
Aug 20th, 2012 | syntax:
None | size: 0.73 KB | hits: 18 | expires: Never
<?php
require_once 'Not_Zend/CsrfProtect.php';
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
public function init()
{
throw new exception('hi');
Zend_Session::start();
}
protected function _initCSRF()
{
$fc = Zend_Controller_Front::getInstance();
$csrfnono = new CU_Controller_Plugin_CsrfProtect(array(
'expiryTime' => 60, //will make the CSRF key expire in 60 seconds. Defaults to 5 minutes
'keyName' => 'csrfnono' //will make the CSRF form element be called "safetycheck". Defaults to "csrf"
));
$fc->registerPlugin($csrfnono);
}
protected function _initDbAdapter()
{
$db = new Zend_Config($this->getOptions('db'));
Zend_Registry::set('DbAdapter', $db);
}
}