本文整理汇总了PHP中cmsCore::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsCore::getVersion方法的具体用法?PHP cmsCore::getVersion怎么用?PHP cmsCore::getVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsCore
的用法示例。
在下文中一共展示了cmsCore::getVersion方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkManifestDepends
private function checkManifestDepends($depends)
{
$results = array();
if (isset($depends['core'])) {
$need = (int) str_pad(str_replace('.', '', $depends['core']), 6, '0');
$has = (int) str_pad(str_replace('.', '', cmsCore::getVersion()), 6, '0');
$results['core'] = $need <= $has ? true : false;
}
return $results;
}
示例2: checkUpdate
public function checkUpdate($only_cached = false)
{
$current_version = cmsCore::getVersion();
$update_info = $this->getUpdateFileContents($current_version, $only_cached);
if (!$update_info) {
return cmsUpdater::UPDATE_CHECK_ERROR;
}
list($next_version, $date, $url) = explode("\n", trim($update_info));
if (version_compare($next_version, $current_version, '<=')) {
$this->deleteUpdateFile();
return cmsUpdater::UPDATE_NOT_AVAILABLE;
}
return array('version' => $next_version, 'date' => $date, 'url' => $url);
}
示例3: checkManifestDepends
private function checkManifestDepends($manifest)
{
$results = array();
if (isset($manifest['depends']['core'])) {
$need = (int) str_pad(str_replace('.', '', $manifest['depends']['core']), 6, '0');
$has = (int) str_pad(str_replace('.', '', cmsCore::getVersion()), 6, '0');
$results['core'] = $need <= $has ? true : false;
}
if (isset($manifest['depends']['package']) && isset($manifest['package']['installed_version'])) {
$need = (int) str_pad(str_replace('.', '', $manifest['depends']['package']), 6, '0');
$has = (int) str_pad(str_replace('.', '', (string) $manifest['package']['installed_version']), 6, '0');
$results['package'] = $need <= $has ? true : false;
}
return $results;
}
示例4: checkManifestDepends
private function checkManifestDepends($manifest)
{
$results = array();
if (isset($manifest['depends']['core'])) {
$results['core'] = version_compare(cmsCore::getVersion(), $manifest['depends']['core']) >= 0 ? true : false;
}
if (isset($manifest['depends']['package']) && isset($manifest['package']['installed_version'])) {
$results['package'] = version_compare((string) $manifest['package']['installed_version'], $manifest['depends']['package']) >= 0 ? true : false;
}
if (isset($manifest['depends']['dependent_type']) && isset($manifest['depends']['dependent_name'])) {
$installed_version = call_user_func(array($this, $manifest['depends']['dependent_type'] . 'Installed'), array('name' => $manifest['depends']['dependent_name'], 'controller' => isset($manifest['depends']['dependent_controller']) ? $manifest['depends']['dependent_controller'] : null));
$valid = $installed_version !== false;
if ($valid && isset($manifest['depends']['dependent_version'])) {
$results['dependent_version'] = version_compare((string) $installed_version, $manifest['depends']['dependent_version']) >= 0 ? true : false;
}
$results['dependent_type'] = $valid;
}
return $results;
}
示例5: href_to
<?php
$this->body();
?>
<div class="pad"></div>
<div class="loading-overlay"></div>
</div>
</div>
<div id="cp_footer">
<div class="container">
<a href="http://www.instantcms.ru/">InstantCMS</a> v<?php
echo cmsCore::getVersion();
?>
—
© <a href="http://www.instantsoft.ru/">InstantSoft</a> 2013 —
<a href="<?php
echo href_to('admin', 'credits');
?>
"><?php
echo LANG_CP_3RDPARTY_CREDITS;
?>
</a>
</div>
</div>
<script>
示例6: systemInstalled
private function systemInstalled($manifest_package)
{
return cmsCore::getVersion();
}