本文整理匯總了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>