Example #1
0
 protected function _initZFDebug()
 {
     if (getenv('APPLICATION_ENV') != 'production' && $this->_config->appSettings->debugMode == 1) {
         $autoloader = Zend_Loader_Autoloader::getInstance();
         $autoloader->registerNamespace('ZFDebug');
         Zend_Session::start();
         $options = array('plugins' => array('Variables', 'File' => array('base_path' => '/path/to/project'), 'Memory', 'Time', 'Registry', 'Exception'));
         # Instantiate the database adapter and setup the plugin.
         # Alternatively just add the plugin like above and rely on the autodiscovery feature.
         if ($this->hasPluginResource('db')) {
             $this->bootstrap('db');
             $db = $this->getPluginResource('db')->getDbAdapter();
             $options['plugins']['Database']['adapter'] = $db;
         }
         # Setup the cache plugin
         if ($this->hasPluginResource('cache')) {
             $this->bootstrap('cache');
             $cache = $this - getPluginResource('cache')->getDbAdapter();
             $options['plugins']['Cache']['backend'] = $cache->getBackend();
         }
         $debug = new ZFDebug_Controller_Plugin_Debug($options);
         $this->bootstrap('frontController');
         $frontController = $this->getResource('frontController');
         $frontController->registerPlugin($debug);
     }
 }
Example #2
0
 protected function _initZFDebug()
 {
     $options = $this->getOption('agana');
     if (isset($options['debug']) && intval($options['debug']['zf'])) {
         $autoloader = Zend_Loader_Autoloader::getInstance();
         $autoloader->registerNamespace('ZFDebug');
         $options = array('plugins' => array('Variables', 'File' => array('base_path' => '/path/to/project'), 'Memory', 'Time', 'Registry', 'Exception'));
         /**
          * Instantiate the database adapter and setup the plugin.
          * Alternatively just add the plugin like above and rely on the 
          * autodiscovery feature.
          */
         if ($this->hasPluginResource('db')) {
             $this->bootstrap('db');
             $db = $this->getPluginResource('db')->getDbAdapter();
             $options['plugins']['Database']['adapter'] = $db;
         }
         # Setup the cache plugin
         if ($this->hasPluginResource('cache')) {
             $this->bootstrap('cache');
             $cache = $this - getPluginResource('cache')->getDbAdapter();
             $options['plugins']['Cache']['backend'] = $cache->getBackend();
         }
         $debug = new ZFDebug_Controller_Plugin_Debug($options);
         $this->bootstrap('frontController');
         $frontController = $this->getResource('frontController');
         $frontController->registerPlugin($debug);
     }
 }
Example #3
0
 protected function _initZFDebug()
 {
     if (APPLICATION_ENV != 'production') {
         $autoloader = Zend_Loader_Autoloader::getInstance();
         $autoloader->registerNamespace('ZFDebug');
         $options = array('plugins' => array('Variables', 'File' => array('base_path' => APPLICATION_PATH), 'Memory', 'Time', 'Registry', 'Exception', 'Xhprof'));
         if ($this->hasPluginResource('db')) {
             $this->bootstrap('db');
             $db = $this->getPluginResource('db')->getDbAdapter();
             $options['plugins']['Database']['adapter'] = $db;
         }
         # Setup the cache plugin
         if ($this->hasPluginResource('cache')) {
             $this->bootstrap('cache');
             $cache = $this - getPluginResource('cache')->getDbAdapter();
             $options['plugins']['Cache']['backend'] = $cache->getBackend();
         }
         $debug = new ZFDebug_Controller_Plugin_Debug($options);
         $this->bootstrap('frontController');
         $frontController = $this->getResource('frontController');
         $frontController->registerPlugin($debug);
     }
 }
Example #4
0
 protected function _initZFDebug()
 {
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->registerNamespace('ZFDebug');
     $options = array('plugins' => array('Variables', 'File' => array('base_path' => APPLICATION_PATH), 'Memory', 'Time', 'Registry', 'Exception', 'Database'));
     # Instantiate the database adapter and setup the plugin.
     # Alternatively just add the plugin like above and rely on the autodiscovery $
     if ($this->hasPluginResource('db')) {
         $this->bootstrap('db');
         $db = $this->getPluginResource('db')->getDbAdapter();
         $options['plugins']['Database']['adapter'] = $db;
     }
     # Setup the cache plugin
     if ($this->hasPluginResource('cache')) {
         $this->bootstrap('cache');
         $cache = $this - getPluginResource('cache')->getDbAdapter();
         $options['plugins']['Cache']['backend'] = $cache->getBackend();
     }
     $debug = new ZFDebug_Controller_Plugin_Debug($options);
     $this->bootstrap('frontController');
     $frontController = $this->getResource('frontController');
     $frontController->registerPlugin($debug);
 }
Example #5
0
 protected function _initZFDebug()
 {
     if (APPLICATION_ENV == 'development') {
         $autoloader = Zend_Loader_Autoloader::getInstance();
         $autoloader->registerNamespace('Smallunch_lib_bundles_ZFDebug');
         $doctrine = $this->getResource('doctrine_conn');
         $options = array('plugins' => array('Variables', 'File' => array('base_path' => ROOT_DIRECTORY), 'Memory', 'Time', 'Registry', 'Smallunch_lib_bundles_ZFDebug_Controller_Plugin_Debug_Plugin_Doctrine', 'Exception'));
         # Setup the cache plugin
         if ($this->hasPluginResource('cache')) {
             $this->bootstrap('cache');
             $cache = $this - getPluginResource('cache')->getDbAdapter();
             $options['plugins']['Cache']['backend'] = $cache->getBackend();
         }
         $this->bootstrap('frontController');
         $frontController = $this->getResource('frontController');
         $frontController->registerPlugin(new Smallunch_lib_bundles_ZFDebug_Controller_Plugin_Debug($options));
     }
 }