public function indexAction()
 {
     Translation_Model_Manager::generate();
     Centurion_Signal::factory('clean_cache')->send($this);
     Centurion_Loader_PluginLoader::cleanCache(Centurion_Loader_PluginLoader::getIncludeFileCache());
     Centurion_Loader_PluginLoader::setStaticCachePlugin(null);
 }
Exemplo n.º 2
0
 public function bootstrap($env)
 {
     putenv('RUN_CLI_MODE=true');
     define('RUN_CLI_MODE', true);
     defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../../../application'));
     // Define application environment
     defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $env);
     // bootstrap include_path and constants
     require realpath(APPLICATION_PATH . '/../library/library.php');
     /** Zend_Application */
     require_once 'Zend/Application.php';
     require_once 'Centurion/Application.php';
     require_once 'Zend/Loader/Autoloader.php';
     $autoloader = Zend_Loader_Autoloader::getInstance()->registerNamespace('Centurion_')->setDefaultAutoloader(create_function('$class', "include str_replace('_', '/', \$class) . '.php';"));
     $classFileIncCache = realpath(APPLICATION_PATH . '/../data/cache') . '/pluginLoaderCache.tmp';
     if (file_exists($classFileIncCache)) {
         $fp = fopen($classFileIncCache, 'r');
         flock($fp, LOCK_SH);
         $data = file_get_contents($classFileIncCache);
         flock($fp, LOCK_UN);
         fclose($fp);
         $data = @unserialize($data);
         if ($data !== false) {
             Centurion_Loader_PluginLoader::setStaticCachePlugin($data);
         }
     }
     Centurion_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     // Create application, bootstrap, and run
     $this->_application = new Centurion_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/');
     $this->_application->bootstrap('db');
     $this->_application->bootstrap('FrontController');
     $this->_application->bootstrap('contrib');
 }
Exemplo n.º 3
0
 public function clearCacheAction()
 {
     //$caches = array();
     //        foreach (Centurion_Config_Manager::get('resources.cachemanager') as $key => $value) {
     //            Zend_Cache::_makeBackend($value['backend']['name'], $value['backend']['options'])->clean(Zend_Cache::CLEANING_MODE_ALL);
     //        }
     Centurion_Signal::factory('clean_cache')->send($this);
     Centurion_Loader_PluginLoader::cleanCache(Centurion_Loader_PluginLoader::getIncludeFileCache());
     Centurion_Loader_PluginLoader::setStaticCachePlugin(null);
 }