Пример #1
0
 protected function _initApplication()
 {
     $defaultDb = $this->multidb->getDb();
     Oray_Dao_Abstract::setDefaultAdapter($defaultDb);
     Oray_Dao_Abstract::registerErrorHandler(array($this, 'daoErrorHandler'));
     Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDb('md')));
     Tudu_User::setMemcache($this->getResource('memcache'));
     //set_error_handler(array($this, 'errorHandler'));
 }
Пример #2
0
 /**
  *
  */
 protected function _initApplication()
 {
     //$defaultDb = $this->multidb->getDb();
     //Oray_Db_Helper::getInstance()->set('tudu-md', $defaultDb);
     Oray_Dao_Abstract::setDefaultAdapter($this->multidb->getDb());
     Oray_Dao_Abstract::registerErrorHandler(array($this, 'daoErrorHandler'));
     Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_MD => $this->multidb->getDb('md')));
     Tudu_User::setMemcache($this->getResource('memcache'));
     $resourceManager = new Tudu_Model_ResourceManager_Registry();
     $resourceManager->setResource('config', $this->_options);
     Tudu_Model::setResourceManager($resourceManager);
     //set_error_handler(array($this, 'errorHandler'));
 }
Пример #3
0
 /**
  * 
  * @param callback $callback
  */
 public static function registerErrorHandler($callback)
 {
     self::$_errorHandler = $callback;
 }