✏️ 正在编辑: Bootstrap.php
路径:
/srv/systems_dir/contemax/application/Bootstrap.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initPluginLoaderCache() { $classFileIncCache = CLIENT_PATH . '/data/cache/pluginLoaderCache.php'; if( file_exists($classFileIncCache) ){ include_once $classFileIncCache; } Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache); } protected function _initAcl() { $role = Yuppie_Auth::hasIdentity() && isset(Yuppie_Auth::getIdentity()->grupo) ? Yuppie_Auth::getIdentity()->grupo : 'guest'; $acl = new Yuppie_Acl(include APPLICATION_PATH . '/configs/acl.php'); Zend_Registry::set('acl', $acl); Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl($acl); Zend_View_Helper_Navigation_HelperAbstract::setDefaultRole($role); } protected function _initNamespace() { $this->_bootstrap('db'); $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace(array( 'Core', 'PHPExcel', 'Validators')); } protected function _initPaginator() { Zend_Paginator::setDefaultItemCountPerPage(5); } protected function _initZFDebug() { $this->bootstrap('db'); // $this->bootstrap('cachemanager'); $zfdebug = $this->getOption('zfdebug'); if( $zfdebug ){ $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('ZFDebug'); // $cachemanager = $this->getResource('cachemanager'); // $cache = $cachemanager ? $cachemanager->getCache('database') : null; $options = array( 'plugins' => array( 'Variables', 'Database' => array( 'adapter' => Zend_Db_Table::getDefaultAdapter() ), 'File' => array( 'basePath' => APPLICATION_PATH . '../' ), 'Memory', 'Time', // 'Cache' => $cache ? array('backend' => $cache->getBackend()) : null, 'Exception' ) ); // if (!$cache) { // unset($options['plugins']['Cache']); // } // $debug = new ZFDebug_Controller_Plugin_Debug($options); // $this->bootstrap('frontController'); // $frontController = $this->getResource('frontController'); // $frontController->registerPlugin($debug); } } protected function _initUploadDirAndConstant() { $uploadPath = PUBLIC_PATH . '/uploads'; if( !file_exists($uploadPath) ){ if( !mkdir($uploadPath) ){ throw new Exception('Cannot make the following directorry: ' . $uploadPath); } } // if $uploadPath was created than define a constant defined('UPLOAD_PATH') || define('UPLOAD_PATH', $uploadPath); } }
💾 保存文件
← 返回文件管理器