本文整理汇总了PHP中Phpfox::internalVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::internalVersion方法的具体用法?PHP Phpfox::internalVersion怎么用?PHP Phpfox::internalVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::internalVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHeader
//.........这里部分代码省略.........
$aSubCacheCheck = array();
foreach ($aCacheCSS as $sFile) {
if (defined('PHPFOX_INSTALLER')) {
$sData .= "\t\t" . '<link rel="stylesheet" type="text/css" href="' . $sFile . $sQmark . 'v=' . $iVersion . '" />' . "\n";
} else {
if (isset($aSubCacheCheck[$sFile])) {
continue;
}
$aSubCacheCheck[$sFile] = true;
$sData .= "\t\t" . '<link rel="stylesheet" type="text/css" href="' . Phpfox::getParam('core.path') . $sFile . $sQmark . 'v=' . $iVersion . '" />' . "\n";
}
}
foreach ($aCacheJs as $sFile) {
if (defined('PHPFOX_INSTALLER')) {
$this->_sFooter .= "\t\t" . '<script type="text/javascript" src="../' . $sFile . $sQmark . 'v=' . $iVersion . '"></script>' . "\n";
} else {
$this->_sFooter .= "\t\t" . '<script type="text/javascript" src="' . Phpfox::getParam('core.path') . $sFile . $sQmark . 'v=' . $iVersion . '"></script>' . "\n";
}
}
if (!defined('PHPFOX_INSTALLER')) {
$this->_sFooter .= "\t\t" . '<script type="text/javascript"> $Core.init(); </script>' . "\n";
}
if (count($this->_aPhrases)) {
$sData .= "\n\t\t<script type=\"text/javascript\">\n\t\t";
foreach ($this->_aPhrases as $sVar => $sPhrase) {
$sPhrase = html_entity_decode($sPhrase, null, 'UTF-8');
$sData .= "\t\t\toTranslations['{$sVar}'] = '" . str_replace("'", "\\'", $sPhrase) . "';\n";
}
$sData .= "\t\t</script>\n";
}
if (!defined('PHPFOX_INSTALLER') && !Phpfox::isAdminPanel()) {
$Request = \Phpfox_Request::instance();
if ($Request->segment(1) == 'theme' && $Request->segment(2) == 'demo') {
$sData .= '<link href="' . Phpfox::getParam('core.path') . 'theme/default/flavor/default.css?v=' . Phpfox::internalVersion() . '" rel="stylesheet">';
} else {
$Theme = $this->_theme->get();
$sData .= '<link href="' . Phpfox::getParam('core.path') . 'themes/' . $Theme->folder . '/flavor/' . $Theme->flavor_folder . '.css?v=' . Phpfox::internalVersion() . '" rel="stylesheet">';
}
}
if (!defined('PHPFOX_INSTALLER')) {
$Apps = new Core\App();
foreach ($Apps->all() as $App) {
$assets = $App->path . 'assets/';
if (file_exists($assets . 'autoload.js')) {
$url = str_replace(PHPFOX_DIR_SITE, Phpfox::getParam('core.path'), $assets) . 'autoload.js';
$this->_sFooter .= '<script src="' . $url . '?v=' . Phpfox::internalVersion() . '"></script>';
}
if (file_exists($assets . 'autoload.css')) {
$url = str_replace(PHPFOX_DIR_SITE, Phpfox::getParam('core.path'), $assets) . 'autoload.css';
$sData .= '<link href="' . $url . '?v=' . Phpfox::internalVersion() . '" rel="stylesheet">';
}
}
if (!Phpfox::isAdminPanel() && is_object($this->_theme)) {
$asset = $this->_theme->get()->getPath() . 'assets/autoload.js';
if (file_exists($asset)) {
$url = str_replace([PHPFOX_DIR_SITE, PHPFOX_DIR], Phpfox::getParam('core.path'), $asset);
$this->_sFooter .= '<script src="' . $url . '?v=' . Phpfox::internalVersion() . '"></script>';
}
}
}
if (isset($this->_meta['head'])) {
$sData .= $this->_meta['head'];
if (Phpfox::isAdmin()) {
$this->_sFooter .= '<script>var page_editor_meta = ' . json_encode(['head' => $this->_meta['head']]) . ';</script>';
}
}
示例2: cacheId
public function cacheId()
{
$id = $this->_request->uri();
return 'request_is_cached_' . md5($id . \Phpfox::internalVersion());
}