コード例 #1
0
 public function run()
 {
     // Lade Konfig
     $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
     Zend_Registry::set('config', $config);
     // Erstelle DB Adapter
     $db = Zend_Db::factory($config->db);
     Zend_Registry::set('db', $db);
     Zend_Db_Table_Abstract::setDefaultAdapter(Zend_Registry::get('db'));
     if (APPLICATION_ENV !== 'production') {
         $profiler = new Zend_Db_Profiler_Firebug('All Database Queries:');
         $profiler->setEnabled(true);
         $db->setProfiler($profiler);
     }
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => ''));
     $resourceLoader->addResourceType('plugins', 'plugins', 'Plugins');
     if (PHP_SAPI != 'cli') {
         $front = Zend_Controller_Front::getInstance();
         $front->registerPlugin(new Plugins_Stats());
         if (APPLICATION_ENV == 'production') {
             $front->registerPlugin(new Plugins_Cache());
         }
     }
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('_partials/controls.phtml');
     parent::run();
 }
コード例 #2
0
ファイル: Bootstrap.php プロジェクト: anunay/stentors
 public function run()
 {
     // Cela permet d'avoir le fichier de configuration disponible depuis n'importe ou dans l'application.
     Zend_Registry::set('config', new Zend_Config($this->getOptions()));
     exit;
     parent::run();
 }
コード例 #3
0
ファイル: Bootstrap.php プロジェクト: minishri9/dash
 public function run()
 {
     Zend_Registry::set("contentdir", $this->getOption('contentdir'));
     Zend_Registry::set("repodir", $this->getOption('repodir'));
     Zend_Registry::set("datadir", $this->getOption('datadir'));
     Zend_Registry::set("defaultbranch", $this->getOption('defaultbranch'));
     Zend_Registry::set("pipelinestages", $this->getOption('pipelinestages'));
     parent::run();
 }
コード例 #4
0
 /**
  * Load controllers into service container and cache if necessary.
  * {@inheritdoc}
  */
 public function run()
 {
     // Load service container if not cached or if we want to cache and cache doesn't esist
     if (!$this->_doCache() || $this->_doCache() && !$this->_cacheExists()) {
         $this->_loadControllersInContainer();
     }
     // Cache loaded service container if we want to cache and cache doesn't already exist
     if ($this->_doCache() && !$this->_cacheExists()) {
         $this->_cacheContainer();
     }
     parent::run();
 }
コード例 #5
0
ファイル: Bootstrap.php プロジェクト: robinmbarnes/EasyCMS
 public function run()
 {
     //Autoload Library classes
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->registerNamespace('EasyCMS_');
     $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/modules/default', 'namespace' => 'App', 'resourceTypes' => array('form' => array('path' => 'forms/', 'namespace' => 'Form'), 'model' => array('path' => 'models/', 'namespace' => 'Model'))));
     $admin_resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH . '/modules/admin', 'namespace' => 'Admin', 'resourceTypes' => array('form' => array('path' => 'forms/', 'namespace' => 'Form'))));
     //Setup modules
     $front = $this->getResource('FrontController');
     $front->addModuleDirectory(APPLICATION_PATH . '/modules');
     $this->setupRoutes($front);
     //Load Doctrine
     $db_config = $this->getApplication()->getOption('database');
     $db_params = $db_config['params'];
     $this->loadDoctrine($db_params['database_name'], $db_params['host'], $db_params['username'], $db_params['password']);
     //Sort out view
     $this->initView();
     Zend_Registry::set('media_path', $this->getApplication()->getOption('media_path'));
     parent::run();
 }
コード例 #6
0
ファイル: Bootstrap.php プロジェクト: shadobladez/erp2
 /**
  * Add graceful error handling to the dispatch, this will handle
  * errors during Front Controller dispatch.
  */
 public function Xrun()
 {
     $errorHandling = $this->getOption('errorhandling');
     try {
         parent::run();
     } catch (Exception $exp) {
         if (true == (bool) $errorHandling['graceful']) {
             $this->__handleErrors($exp, $errorHandling['email']);
         } else {
             throw $exp;
         }
     }
 }
コード例 #7
0
ファイル: Bootstrap.php プロジェクト: knatorski/SMS
 public function run()
 {
     $this->resourcesTuneup();
     $this->profiler();
     $this->formsTracker();
     $this->setupLogicCustomer();
     parent::run();
 }
コード例 #8
0
ファイル: Bootstrap.php プロジェクト: niavok/syj
 public function run()
 {
     Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->initView(APPLICATION_PATH . '/views/', 'Syj_View');
     parent::run();
 }
コード例 #9
0
ファイル: Escort.php プロジェクト: GemsTracker/MUtil
 /**
  * No hook. Run the application.
  *
  * Registers the bootstrap as a FrontController Plugin and calls
  * beforeRun() and the parent::run(). Final as these actions are
  * crucial to the workings of this class.
  *
  * As long as $stackIndex is < 99 then postDispatch() becalled before the
  * $layout is rendered. If $stackIndex is < -80 then the controllerAfterAction()
  * event will be called before the $view is rendered as well.
  * By default the layout is called after postDispatch() while
  * controllerAfterAction() will be called after the rendering of the view.
  *
  * @param  int $stackIndex Optional; stack index for plugins
  * @return void
  * @throws \Zend_Application_Bootstrap_Exception
  */
 public final function run($stackIndex = null)
 {
     \MUtil_Application_EscortPlugin::register($this, $stackIndex);
     \MUtil_Application_EscortControllerHelper::register($this, $stackIndex);
     $this->beforeRun();
     parent::run();
     $this->responseSend();
 }
コード例 #10
0
ファイル: Bootstrap.php プロジェクト: kokx/Firal
 /**
  * Override of run method to provide JSON server interface
  *
  * @return void
  */
 public function run()
 {
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
         // run Zend_Json_Server instead of the MVC stack
         $request = new Zend_Controller_Request_Http();
         $info = explode('/', trim($request->getPathInfo(), '/'));
         $module = $info[0];
         $service = $info[1];
         // attach the service to the JSON-RPC server
         $service = $this->_loadService($module, $service);
         $server = new Zend_Json_Server();
         $server->setClass($service);
         if ('GET' == $_SERVER['REQUEST_METHOD']) {
             // return the service map
             $server->setEnvelope(Zend_Json_Server_Smd::ENV_JSONRPC_2);
             $smd = $server->getServiceMap();
             header('Content-Type: application/json');
             echo $smd;
             return;
         }
         $server->handle();
     } else {
         parent::run();
     }
 }
コード例 #11
0
ファイル: Bootstrap.php プロジェクト: IASA-GR/appdb-core
 public function run()
 {
     $resource = $this->getPluginResource('multidb');
     $resource->init();
     Zend_Registry::set('repository', $resource->getDb('repository'));
     $db = $this->getPluginResource('db');
     $db->init();
     $db = $db->getDbAdapter();
     Zend_Registry::set("db", $db);
     parent::run();
 }
コード例 #12
0
ファイル: Bootstrap.php プロジェクト: Cydev2306/Nao-App
 public function run()
 {
     parent::run();
 }
コード例 #13
0
ファイル: Bootstrap.php プロジェクト: cwcw/cms
 /**
  *
  */
 public function run()
 {
     $this->init();
     parent::run();
 }