当前位置: 首页>>代码示例>>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;未经允许,请勿转载。