本文整理匯總了PHP中XenForo_Application::jsVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_Application::jsVersion方法的具體用法?PHP XenForo_Application::jsVersion怎麽用?PHP XenForo_Application::jsVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenForo_Application
的用法示例。
在下文中一共展示了XenForo_Application::jsVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadDefaultData
/**
* Loads the default data for the application (config, DB, options, etc).
*/
public function loadDefaultData()
{
$config = $this->loadConfig();
self::set('config', $config);
self::setDebugMode($config->debug);
self::$jsVersion = substr(md5(self::$versionId . $config->jsVersion), 0, 8);
self::$externalDataPath = (string) $config->externalDataPath;
$this->addLazyLoader('db', array($this, 'loadDb'), $config->db);
$this->addLazyLoader('cache', array($this, 'loadCache'), $config->cache);
$this->addLazyLoader('options', array($this, 'loadOptions'));
$this->addLazyLoader('simpleCache', array($this, 'loadSimpleCache'));
}
示例2: setDefaultsFromOptions
/**
* Setup necessary system defaults based on the options.
*
* @param XenForo_Options $options
*/
public static function setDefaultsFromOptions(XenForo_Options $options)
{
if ($options->useFriendlyUrls) {
XenForo_Link::useFriendlyUrls(true);
}
if ($options->romanizeUrls) {
XenForo_Link::romanizeTitles(true);
}
if ($options->indexRoute && preg_match('/^[a-z0-9-]/i', $options->indexRoute)) {
XenForo_Link::setIndexRoute($options->indexRoute);
}
XenForo_Link::includeTitlesInUrls($options->includeTitleInUrls);
self::$jsVersion = substr(md5(self::$jsVersion . $options->jsLastUpdate), 0, 8);
}