當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tinebase_Core::setupCache方法代碼示例

本文整理匯總了PHP中Tinebase_Core::setupCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tinebase_Core::setupCache方法的具體用法?PHP Tinebase_Core::setupCache怎麽用?PHP Tinebase_Core::setupCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tinebase_Core的用法示例。


在下文中一共展示了Tinebase_Core::setupCache方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _initFramework

 /**
  * init tine framework
  */
 protected function _initFramework()
 {
     $this->_setupCliConfig();
     Tinebase_Core::setupTempDir();
     Tinebase_Core::setupServerTimezone();
     Tinebase_Core::setupLogger();
     Tinebase_Core::setupStreamWrapper();
     Tinebase_Core::setupSession();
     Tinebase_Core::set(Tinebase_Core::LOCALE, new Zend_Locale('en_US'));
     Tinebase_Core::set(Tinebase_Core::USERTIMEZONE, 'UTC');
     Tinebase_Core::setupDatabaseConnection();
     Tinebase_Core::setupCache();
     Tinebase_Core::setupUserTimezone();
     Tinebase_Core::setupUserLocale();
 }
開發者ID:,項目名稱:,代碼行數:18,代碼來源:

示例2: _init

 /**
  * init the environment
  *
  */
 protected function _init()
 {
     // init environment
     Tinebase_Core::setupConfig();
     Tinebase_Core::setupLogger();
     Tinebase_Core::set('locale', new Zend_Locale('de_DE'));
     Tinebase_Core::set(Tinebase_Core::USERTIMEZONE, 'UTC');
     Tinebase_Core::setupDatabaseConnection();
     Tinebase_Core::setupCache();
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:14,代碼來源:Egw14.php

示例3: initFramework

 /**
  * init tine framework
  */
 public static function initFramework()
 {
     // avoid autostart of sessions
     Zend_Session::setOptions(array('strict' => true));
     Tinebase_Core::setupTempDir();
     Tinebase_Core::setupStreamWrapper();
     //Cache must be setup before User Locale because otherwise Zend_Locale tries to setup
     //its own cache handler which might result in a open_basedir restriction depending on the php.ini settings
     Tinebase_Core::setupCache();
     Tinebase_Core::setupBuildConstants();
     // setup a temporary user locale. This will be overwritten later but we
     // need to handle exceptions during initialisation process such as session timeout
     // @todo add fallback locale to config file
     Tinebase_Core::set('locale', new Zend_Locale('en_US'));
     Tinebase_Core::setupUserLocale();
     Tinebase_Core::enableProfiling();
     if (PHP_SAPI !== 'cli') {
         header('X-API: http://www.tine20.org/apidocs/tine20/');
         if (isset($_SERVER['HTTP_X_TRANSACTIONID'])) {
             header('X-TransactionID: ' . substr($_SERVER['HTTP_X_TRANSACTIONID'], 1, -1) . ';' . $_SERVER['SERVER_NAME'] . ';16.4.5009.816;' . date('Y-m-d H:i:s') . ' UTC;265.1558 ms');
         }
     }
 }
開發者ID:hernot,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:26,代碼來源:Core.php

示例4: setupCache

 /**
  * setup the cache and add it to zend registry
  * 
  * Ignores {@param $_enabled} and always sets it to false
  *
  */
 public static function setupCache($_enabled = true)
 {
     // disable caching for setup
     parent::setupCache(false);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:11,代碼來源:Core.php

示例5: _clearCache

 /**
  * clear cache
  *
  * @return void
  */
 protected function _clearCache()
 {
     // setup cache (via tinebase because it is disabled in setup by default)
     Tinebase_Core::setupCache(TRUE);
     Setup_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' Clearing cache ...');
     // clear cache
     $cache = Setup_Core::getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);
     // deactivate cache again
     Tinebase_Core::setupCache(FALSE);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:15,代碼來源:Controller.php

示例6: getCache

 /**
  * get cache from the registry
  *
  * @return Zend_Cache_Core the cache
  */
 public static function getCache()
 {
     if (!self::get(self::CACHE) instanceof Zend_Cache_Core) {
         self::$cacheStatus = null;
         Tinebase_Core::setupCache();
     }
     return self::get(self::CACHE);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:13,代碼來源:Core.php

示例7: _invalidateAccountCache

 /**
  * invalidate cache for this account
  *
  * @param Expressomail_Model_Account $_account
  * @return void
  */
 protected function _invalidateAccountCache(Expressomail_Model_Account $_account)
 {
     Tinebase_Core::setupCache();
     $cache = Tinebase_Core::getCache();
     $cacheId = Tinebase_Core::createCacheId(array(Tinebase_Core::getUser()->accountId, $_account->getId()));
     $_filter = new Expressomail_Model_AccountFilter(array());
     //Cleans cache generate in user login, when the method seach is called with a empty filter.
     $cacheSearch = Tinebase_Core::createCacheId(array('Expressomail_Controller_Account_search', Tinebase_Core::getUser()->accountId, $_filter->toArray()));
     $cache->remove($cacheId);
     $cache->remove($cacheSearch);
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:17,代碼來源:Account.php

示例8: _loadAllAppConfigsInCache

 /**
  * fill class cache with all config records for this app
  */
 protected function _loadAllAppConfigsInCache()
 {
     if (empty($this->_appName)) {
         if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
             Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' appName not set');
         }
         $this->_cachedApplicationConfig = array();
     }
     if (!Tinebase_Application::getInstance()->getInstance()->isInstalled('Tinebase')) {
         $this->_cachedApplicationConfig = array();
         return;
     }
     $cache = Tinebase_Core::getCache();
     if (!is_object($cache)) {
         Tinebase_Core::setupCache();
         $cache = Tinebase_Core::getCache();
     }
     if (Tinebase_Core::get(Tinebase_Core::SHAREDCACHE)) {
         if ($cachedApplicationConfig = $cache->load('cachedAppConfig_' . $this->_appName)) {
             $this->_cachedApplicationConfig = $cachedApplicationConfig;
             return;
         }
     }
     try {
         $applicationId = Tinebase_Model_Application::convertApplicationIdToInt($this->_appName);
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
             Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Loading all configs for app ' . $this->_appName);
         }
         $filter = new Tinebase_Model_ConfigFilter(array(array('field' => 'application_id', 'operator' => 'equals', 'value' => $applicationId)));
         $allConfigs = $this->_getBackend()->search($filter);
     } catch (Zend_Db_Exception $zdae) {
         // DB might not exist or tables are not created, yet
         Tinebase_Exception::log($zdae);
         $this->_cachedApplicationConfig = array();
         return;
     }
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Found ' . count($allConfigs) . ' configs.');
     }
     if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) {
         Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' ' . print_r($allConfigs->toArray(), TRUE));
     }
     foreach ($allConfigs as $config) {
         $this->_cachedApplicationConfig[$config->name] = $config;
     }
     if (Tinebase_Core::get(Tinebase_Core::SHAREDCACHE)) {
         $cache->save($this->_cachedApplicationConfig, 'cachedAppConfig_' . $this->_appName);
     }
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:52,代碼來源:Abstract.php

示例9: update

 /**
  * update one record
  *
  * @param   Tinebase_Record_Interface $_record
  * @param   boolean $_duplicateCheck
  * @return  Tinebase_Record_Interface
  * @throws  Tinebase_Exception_AccessDenied
  *
  */
 public function update(Tinebase_Record_Interface $_record, $_duplicateCheck = TRUE)
 {
     $sharedSeenValue = $_record->shared_seen;
     $updatedRecord = parent::update($_record, $_duplicateCheck);
     if ($this->_checkSharedSeenSupport($_record)) {
         $updatedRecord->shared_seen_support = TRUE;
         if ($this->_setSharedSeenValue($_record, $sharedSeenValue)) {
             $updatedRecord->shared_seen = $sharedSeenValue;
         } else {
             Tinebase_Core::getLogger()->err(__METHOD__ . '::' . __LINE__ . ' Imap command failed when setting sharedseen value!');
             $translate = Tinebase_Translation::getTranslation('Expressomail');
             $message = $translate->_('Imap command failed when setting sharedseen value!');
             throw new Expressomail_Exception_IMAPCommandFailed($message);
         }
     }
     Tinebase_Core::setupCache();
     $cache = Tinebase_Core::getCache();
     $cache->save($updatedRecord, $this->_createExpressomailModelAccountCacheId($updatedRecord->id), array('expressomailAccount'));
     return $updatedRecord;
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:29,代碼來源:Account.php

示例10: initFramework

 /**
  * init tine framework
  */
 public static function initFramework()
 {
     Tinebase_Core::setupConfig();
     // Server Timezone must be setup before logger, as logger has timehandling!
     Tinebase_Core::setupServerTimezone();
     Tinebase_Core::setupLogger();
     // Database Connection must be setup before cache because setupCache uses constant "SQL_TABLE_PREFIX"
     Tinebase_Core::setupDatabaseConnection();
     Tinebase_Core::setupTempDir();
     Tinebase_Core::setupStreamWrapper();
     //Cache must be setup before User Locale because otherwise Zend_Locale tries to setup
     //its own cache handler which might result in a open_basedir restriction depending on the php.ini settings
     Tinebase_Core::setupCache();
     Tinebase_Core::setupSession();
     // setup a temporary user locale/timezone. This will be overwritten later but we
     // need to handle exceptions during initialisation process such as session timeout
     // @todo add fallback locale to config file
     Tinebase_Core::set('locale', new Zend_Locale('en_US'));
     Tinebase_Core::set('userTimeZone', 'UTC');
     //        Tinebase_Core::setupMailer();
     Tinebase_Core::setupUserCredentialCache();
     Tinebase_Core::setupUserTimezone();
     Tinebase_Core::setupUserLocale();
     header('X-API: http://www.tine20.org/apidocs/tine20/');
 }
開發者ID:,項目名稱:,代碼行數:28,代碼來源:

示例11: _init

 /**
  * init the environment
  *
  */
 protected function _init()
 {
     // init environment
     Tinebase_Core::setupConfig();
     Tinebase_Core::setupServerTimezone();
     Tinebase_Core::setupLogger();
     Tinebase_Core::set('locale', new Zend_Locale('de_DE'));
     Tinebase_Core::set('userTimeZone', 'UTC');
     Tinebase_Core::setupDatabaseConnection();
     Tinebase_Core::setupCache();
 }
開發者ID:rodrigofns,項目名稱:ExpressoLivre3,代碼行數:15,代碼來源:Egw14.php


注:本文中的Tinebase_Core::setupCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。