当前位置: 首页>>代码示例>>PHP>>正文


PHP Tinebase_Core::guessTempDir方法代码示例

本文整理汇总了PHP中Tinebase_Core::guessTempDir方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Core::guessTempDir方法的具体用法?PHP Tinebase_Core::guessTempDir怎么用?PHP Tinebase_Core::guessTempDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tinebase_Core的用法示例。


在下文中一共展示了Tinebase_Core::guessTempDir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testComposeConfigDir

 /**
  * testComposeConfigDir
  *
  * @see 0010988: load additional config from conf.d
  */
 public function testComposeConfigDir()
 {
     $confdfolder = Tinebase_Config::getInstance()->get(Tinebase_Config::CONFD_FOLDER);
     if (empty($confdfolder) || !is_readable($confdfolder)) {
         $this->markTestSkipped('no confdfolder configured/readable');
     }
     $configValues = array('config1' => 'value1', 'config2' => 'value2');
     foreach ($configValues as $configName => $expectedValue) {
         $configValue = Tinebase_Config::getInstance()->get($configName);
         $this->assertEquals($expectedValue, $configValue);
     }
     $cachedConfigFilename = Tinebase_Core::guessTempDir() . DIRECTORY_SEPARATOR . 'cachedConfig.inc.php';
     $this->assertTrue(file_exists($cachedConfigFilename), 'cached config file does not exist: ' . $cachedConfigFilename);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:19,代码来源:ConfigTest.php

示例2: clearCache

 /**
  * clear the cache
  * @param   array $appFilter
  */
 public function clearCache($appFilter = null)
 {
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Clearing config cache');
     }
     if (Tinebase_Core::get(Tinebase_Core::SHAREDCACHE)) {
         if (isset($appFilter)) {
             list($key, $value) = each($appFilter);
             $appName = $key === 'name' ? $value : Tinebase_Application::getInstance()->getApplicationById($value)->name;
         } else {
             $appName = $this->_appName;
         }
         Tinebase_Core::getCache()->remove('cachedAppConfig_' . $appName);
     }
     Tinebase_Cache_PerRequest::getInstance()->reset('Tinebase_Config_Abstract');
     $cachedConfigFile = Tinebase_Core::guessTempDir() . DIRECTORY_SEPARATOR . 'cachedConfig.inc.php';
     if (file_exists($cachedConfigFile)) {
         unlink($cachedConfigFile);
     }
     // reset class caches last because they would be filled again by Tinebase_Core::guessTempDir()
     self::$_configFileData = null;
     $this->_cachedApplicationConfig = null;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:27,代码来源:Abstract.php

示例3: getSessionDir

 /**
  * get session dir string (without PATH_SEP at the end)
  *
  * @return string
  */
 public static function getSessionDir()
 {
     $config = Tinebase_Core::getConfig();
     $sessionDir = $config->session && $config->session->path ? $config->session->path : null;
     #####################################
     # LEGACY/COMPATIBILITY:
     # (1) had to rename session.save_path key to sessiondir because otherwise the
     # generic save config method would interpret the "_" as array key/value seperator
     # (2) moved session config to subgroup 'session'
     if (empty($sessionDir)) {
         foreach (array('session.save_path', 'sessiondir') as $deprecatedSessionDir) {
             $sessionDir = $config->get($deprecatedSessionDir, null);
             if ($sessionDir) {
                 Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . " config.inc.php key '{$deprecatedSessionDir}' should be renamed to 'path' and moved to 'session' group.");
             }
         }
     }
     #####################################
     if (empty($sessionDir) || !@is_writable($sessionDir)) {
         $sessionDir = session_save_path();
         if (empty($sessionDir) || !@is_writable($sessionDir)) {
             $sessionDir = Tinebase_Core::guessTempDir();
         }
         $sessionDirName = self::SESSION_DIR_NAME;
         $sessionDir .= DIRECTORY_SEPARATOR . $sessionDirName;
     }
     Tinebase_Core::getLogger()->DEBUG(__METHOD__ . '::' . __LINE__ . " Using session dir: " . $sessionDir);
     return $sessionDir;
 }
开发者ID:hernot,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:34,代码来源:Abstract.php

示例4: _createDocument

 /**
  * create new excel document
  *
  * @return void
  */
 protected function _createDocument()
 {
     // this looks stupid, but the PHPDoc library is beta, so this is needed. otherwise the lib would create temp files in the template folder ;(
     $templateFile = $this->_getTemplateFilename();
     $tempTemplateFile = Tinebase_Core::guessTempDir() . DIRECTORY_SEPARATOR . Tinebase_Record_Abstract::generateUID() . '.docx';
     copy($templateFile, $tempTemplateFile);
     $this->_docObject = new PHPWord();
     if ($templateFile !== NULL) {
         $this->_docTemplate = $this->_docObject->loadTemplate($tempTemplateFile);
     }
     unlink($tempTemplateFile);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:17,代码来源:Doc.php


注:本文中的Tinebase_Core::guessTempDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。