public static function setAcl() { self::$acl = new Zend_Acl(); require 'Acl.php'; foreach ($privileges as $module => $moduleConfig) { foreach ($moduleConfig as $controller => $controllerConfig) { self::$acl->add(new Zend_Acl_Resource($module . '_' . $controller)); foreach ($controllerConfig as $action => $role) { self::$acl->allow($role, $module . '_' . $controller, $action); } } } Zend_Registry::set('acl', self::$acl); }
private static function runBootstrap($bootstrap) { self::$bootstrap = new $bootstrap(); $classname = 'Core_Config_IApplication'; if (!self::$bootstrap instanceof $classname) { throw new Core_Exceptions("Bootstrap is not implementing Core_Config_IApplication interface"); } self::setSessionHandler(self::$bootstrap->getSessionTypeFile()); self::$bootstrap->run(); self::$acl = self::$bootstrap->getAcl(); self::$acl->validate(); self::$templates = self::$bootstrap->getTemplates(); self::setActiveTemplate(self::$bootstrap->getActiveTemplate()); self::$router = self::$bootstrap->getRouter(); }