本文整理汇总了PHP中sfSympalConfig::getCurrentVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP sfSympalConfig::getCurrentVersion方法的具体用法?PHP sfSympalConfig::getCurrentVersion怎么用?PHP sfSympalConfig::getCurrentVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfSympalConfig
的用法示例。
在下文中一共展示了sfSympalConfig::getCurrentVersion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* @see sfTask
*/
protected function execute($arguments = array(), $options = array())
{
$version = sfSympalConfig::getCurrentVersion();
$formattedVersion = $this->formatter->format($version, 'INFO');
$dir = $this->configuration->getPluginConfiguration('sfSympalPlugin')->getRootDir();
if (isset($options['check']) && $options['check']) {
$upgrade = new sfSympalUpgradeFromWeb($this->configuration, $this->dispatcher, $this->formatter);
if ($upgrade->hasNewVersion()) {
$formattedVersion = $this->formatter->format($upgrade->getLatestVersion(), 'INFO');
$this->log(sprintf("\nSympal %s is available for download.\n", $formattedVersion));
$command = $this->formatter->format('./symfony sympal:upgrade --download-new', 'COMMENT');
$this->log(sprintf("Run %s to download the new version and upgrade.\n", $command));
} else {
$this->log(sprintf("\nYou are up to date with Sympal %s (%s)\n", $formattedVersion, $dir));
}
} else {
$this->log(sprintf('Current Sympal version %s (%s)', $formattedVersion, $dir));
}
}
示例2: getCurrentVersion
public function getCurrentVersion()
{
return sfSympalConfig::getCurrentVersion();
}
示例3: get_sympal_flash
<div id="sympal_ajax_loading">
Loading...
</div>
<div id="container">
<div id="content">
<?php
echo get_sympal_flash();
?>
<?php
echo $sf_content;
?>
</div>
<?php
if ($sf_sympal_context->getSite() && $sf_user->isAuthenticated()) {
?>
<div id="footer">
<p><?php
echo __('Powered by %1% %2%', array('%1%' => link_to('Sympal', 'http://www.sympalphp.org', 'target=_BLANK'), '%2%' => sfSympalConfig::getCurrentVersion()));
?>
.</p>
</div>
<?php
}
?>
</div>
</body>
</html>