本文整理汇总了PHP中CApi::Version方法的典型用法代码示例。如果您正苦于以下问题:PHP CApi::Version方法的具体用法?PHP CApi::Version怎么用?PHP CApi::Version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CApi
的用法示例。
在下文中一共展示了CApi::Version方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->Path = \CApi::DataPath() . '/sessions';
$oSession = \MailSo\Cache\CacheClient::NewInstance();
$oSessionDriver = \MailSo\Cache\Drivers\File::NewInstance($this->Path);
$oSessionDriver->bRootDir = true;
$oSession->SetDriver($oSessionDriver);
$oSession->SetCacheIndex(\CApi::Version());
$this->Session = $oSession;
}
示例2: buildBody
/**
* @param string $sWebPath Default value is **'.'**.
* @param bool $bHelpdesk Default value is **false**.
* @param int $iHelpdeskIdTenant Default value is **null**.
* @param string $sHelpdeskHash Default value is empty string.
* @param string $sCalendarPubHash Default value is empty string.
* @param string $sFileStoragePubHash Default value is empty string.
* @param bool $bMobile Default value is **false**.
*
* @return string
*/
public function buildBody($sWebPath = '.', $bHelpdesk = false, $iHelpdeskIdTenant = null, $sHelpdeskHash = '', $sCalendarPubHash = '', $sFileStoragePubHash = '', $bMobile = false)
{
list($sLanguage, $sTheme, $sSiteName) = $this->getThemeAndLanguage();
$sMobileSuffix = $bMobile && !$bHelpdesk ? '-mobile' : '';
$sWebPath = empty($sWebPath) ? '.' : $sWebPath;
return '<div class="pSevenMain"><div id="pSevenLoading"></div><div id="pSevenContent"></div><div id="pSevenHidden"></div>' . '<div>' . $this->compileTemplates($sTheme, $bMobile) . '<script src="' . $sWebPath . '/static/js/libs.js?' . CApi::VersionJs() . '"></script>' . $this->compileLanguage($sLanguage) . $this->compileAppData($bHelpdesk, $iHelpdeskIdTenant, $sHelpdeskHash, $sCalendarPubHash, $sFileStoragePubHash) . '<script src="' . $sWebPath . '/static/js/app' . $sMobileSuffix . ($bHelpdesk ? '-helpdesk' : (empty($sCalendarPubHash) ? empty($sFileStoragePubHash) ? '' : '-filestorage-pub' : '-calendar-pub')) . (CApi::GetConf('labs.use-app-min-js', false) ? '.min' : '') . '.js?' . CApi::VersionJs() . '"></script>' . (CApi::Plugin()->HasJsFiles() ? '<script src="?/Plugins/js/' . CApi::Plugin()->Hash() . '/"></script>' : '') . '</div></div>' . "\r\n" . '<!-- ' . CApi::Version() . ' -->';
}
示例3: VersionJs
/**
* @return string
*/
public static function VersionJs()
{
return preg_replace('/[^0-9a-z]/', '', CApi::Version() . (CApi::GetConf('labs.cache.static', true) ? '' : '-' . md5(time())));
}
示例4: Hash
/**
* @return string
*/
public function Hash()
{
$sResult = md5(CApi::Version());
foreach ($this->_aPlugins as $oPlugin) {
$sResult = md5($sResult . $oPlugin->GetPath() . $oPlugin->GetName() . $oPlugin->GetHash());
}
return $sResult;
}
示例5: Hash
/**
* @return string
*/
public function Hash()
{
$sResult = md5(CApi::Version());
foreach ($this->_aModules as $oModule) {
$sResult = md5($sResult . $oModule->GetPath() . $oModule->GetName() . $oModule->GetHash());
}
return $sResult;
}
示例6: buildBody
/**
* Returns application html.
*
* @param string $sModuleHash
* @return string
*/
public function buildBody($sModuleHash = '')
{
list($sLanguage, $sTheme, $sSiteName) = $this->getThemeAndLanguage();
return $this->compileTemplates() . $this->compileLanguage($sLanguage) . $this->compileAppData() . $this->getJsLinks($sModuleHash) . "\r\n" . '<!-- ' . CApi::Version() . ' -->';
}