本文整理汇总了PHP中Version::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Version::getVersion方法的具体用法?PHP Version::getVersion怎么用?PHP Version::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Version
的用法示例。
在下文中一共展示了Version::getVersion方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _open
private static function _open()
{
$res = '<StampMaster>';
$res .= '<version>' . Version::getVersion() . '</version>';
$res .= '</StampMaster>';
return $res;
}
示例2: handleException
/**
* System Exception Handler
*
* @param \Exception $exception The exception to handle
*
* @return void
*/
public function handleException(\Exception $exception)
{
fwrite(STDERR, "\n\nOups... phpDox encountered a problem and has terminated!\n");
fwrite(STDERR, "\nIt most likely means you've found a bug, so please file a report for this\n");
fwrite(STDERR, "and paste the following details and the stacktrace (if given) along:\n\n");
fwrite(STDERR, "PHP Version: " . PHP_VERSION . " (" . PHP_OS . ")\n");
fwrite(STDERR, "PHPDox Version: " . $this->version->getVersion() . "\n");
$this->renderException($exception);
fwrite(STDERR, "\n\n\n");
}
示例3: render
/**
* Renders the view. It simply gets all the parameters we've been adding to it
* and puts them in the context of the template renderer so that they can be accessed
* as normal parameters from within the template
*/
function render()
{
// set the view character set based on the default locale
$config =& Config::getConfig();
$locale =& Locales::getLocale($config->getValue("default_locale"));
$this->setValue('version', Version::getVersion());
$this->setCharset($locale->getCharset());
parent::render();
// to find the template we need, we can use the TemplateService
$ts = new TemplateService();
$template = $ts->Template(DEFAULTADMIN_TEMPLATE, "admin");
$this->setValue("locale", $locale);
// assign all the values
$template->assign($this->_params->getAsArray());
// and send the results
print $template->fetch();
}
示例4: render
function render()
{
// set the view character set based on the default locale
$config =& Config::getConfig();
$locale =& Locales::getLocale($config->getValue("default_locale"));
$this->setValue('version', Version::getVersion());
$this->setCharset($locale->getCharset());
parent::render();
// load the contents into the template context
$ts = new TemplateService();
$template = $ts->Template(ADMINSIMPLEMESSAGE_TEMPLATE, "admin");
$this->setValue("locale", $locale);
// and pass the values to the template
$template->assign($this->_params->getAsArray());
// finally, send the results
print $template->fetch();
}
示例5: render
/**
* call the View::render() method.
*/
function render()
{
// set a few common parametres...
$config =& Config::getConfig();
$this->setValue('baseurl', $config->getValue('base_url'));
$this->setValue('version', Version::getVersion());
$this->setValue('uploads_enabled', $config->getValue('uploads_enabled'));
//
// stuff to generate the menu on the left
//
$menu =& Menu::getMenu();
// initialize the menu renderer, passing as parameters the original menu structure,
// the current logged in user (so that we can check permissions and so on)
// and the current value of the 'op' parameter so that we can now which option is the
// current active one
$menuRenderer = new MenuRenderer($menu, $this->_blogInfo, $this->_userInfo);
//$this->setValue( "menus", $menuRenderer->generateAt("Manage"));
$this->setValue('menu', $menuRenderer);
parent::render();
}
示例6: OutputTinyMCEDialogVars
/**
* Add the Dialog for TinyMCE
* @static
* @since 1.6
*/
static function OutputTinyMCEDialogVars()
{
$data = array('pluginVersion' => Version::getVersion(), 'includesUrl' => includes_url(), 'pluginsUrl' => plugins_url());
?>
<script type="text/javascript">
// <![CDATA[
window.mixcloudEmbedDialogData = <?php
echo json_encode($data);
?>
;
// ]]>
</script>
<?php
}
示例7: render
function render()
{
// build the file name
$templateFileName = "wizard/" . $this->_templateName . ".template";
//$t = new Template( $templateFileName, "" );
$t = new Smarty();
$v = new Version();
$this->_params->setValue("version", $v->getVersion());
$this->_params->setValue("projectPage", $v->getProjectPage());
$this->_params->setValue("safeMode", ini_get("safe_mode"));
$t->assign($this->_params->getAsArray());
$t->template_dir = "./templates";
$t->compile_dir = TEMP_FOLDER;
$t->cache_dir = TEMP_FOLDER;
$t->use_sub_dirs = false;
$t->caching = false;
print $t->fetch($templateFileName);
}
示例8: testConstructorCastToInt
public function testConstructorCastToInt()
{
$version = new Version('1.0');
$this->assertEquals(1, $version->getVersion());
$this->assertInternalType('integer', $version->getVersion());
}
示例9: Version
<?php
include_once 'soap/classDef.php';
include_once 'soap/login.php';
include 'soap/Version.php';
$version = new Version("https://ecws.e-control.at/axis2/services/Version?wsdl", $options);
//$version = new Version();
$vResp = $version->getVersion();
echo $vResp->return . "<br/>\n";
include 'soap/logout.php';
示例10: showAction
function showAction()
{
$this->version = Version::getVersion();
$this->layout = 'default';
$this->render('version/show');
}
示例11: updateVersion
private function updateVersion(Addon $addon, Version $package)
{
$version = null;
if ($addon->isInDB()) {
$version = $addon->Versions()->filter('Version', $package->getVersionNormalized())->first();
}
if (!$version) {
$version = new AddonVersion();
}
$version->Name = $package->getName();
$version->Type = str_replace('silverstripe-', '', $package->getType());
$version->Description = $package->getDescription();
$version->Released = strtotime($package->getTime());
$keywords = $package->getKeywords();
if ($keywords) {
foreach ($keywords as $keyword) {
$keyword = AddonKeyword::get_by_name($keyword);
$addon->Keywords()->add($keyword);
$version->Keywords()->add($keyword);
}
}
$version->Version = $package->getVersionNormalized();
$version->PrettyVersion = $package->getVersion();
$stability = VersionParser::parseStability($package->getVersion());
$isDev = $stability === 'dev';
$version->Development = $isDev;
$version->SourceType = $package->getSource()->getType();
$version->SourceUrl = $package->getSource()->getUrl();
$version->SourceReference = $package->getSource()->getReference();
if ($package->getDist()) {
$version->DistType = $package->getDist()->getType();
$version->DistUrl = $package->getDist()->getUrl();
$version->DistReference = $package->getDist()->getReference();
$version->DistChecksum = $package->getDist()->getShasum();
}
$version->Extra = $package->getExtra();
$version->Homepage = $package->getHomepage();
$version->License = $package->getLicense();
// $version->Support = $package->getSupport();
$addon->Versions()->add($version);
$this->updateLinks($version, $package);
$this->updateCompatibility($addon, $version, $package);
$this->updateAuthors($version, $package);
}
示例12: switch
<?php
} else {
if ($do == 'add') {
$version = $_POST['version'];
?>
<?php
switch ($_POST['ver']) {
case "alpha":
$version .= 'α';
break;
case "beta":
$version .= 'β';
break;
}
Version::create($version);
Event::addEvent('Version ' . $version . ' has been added.', $_SESSION['user'], 1);
}
}
} else {
if ($action == 'current') {
$version = new Version($_GET['id']);
$version->makeCurrent();
Event::addEvent('Version ' . $version->getVersion() . ' is now the current version.', $_SESSION['user'], 2);
?>
<script>
load('version', 'none', 'none');
</script>
<?php
}
}
}
示例13: render
/**
* Sets some in this case, we leave it all up to the child classes to reimplement
* this and by default call View::render()
*
* @returns always true
*/
function render()
{
if (!$this->isCached()) {
// and then add our stuff to the view...
$this->setValue('archives', $this->_getArchives());
$this->setValue('recentposts', $this->_getRecentPosts());
$this->setValue('mylinkscategories', $this->_getLinkCategories());
$this->setValue('monthposts', $this->_getMonthPosts());
$this->setValue('articlecategories', $this->_getArticleCategories());
$this->generateCalendar($this->getValue('Year'), $this->getValue('Month'));
// also, let's not forget about the plugins...
// put the plugins in the context
$plugins = $this->_pm->getPlugins();
foreach ($plugins as $name => $plugin) {
$this->setValue($name, $plugin);
}
}
//
// these things can go in since they do not mean much overhead when generating the view...
//
$this->setValue('locale', $this->_blogInfo->getLocale());
$this->setValue('version', Version::getVersion());
$this->setValue('now', new Timestamp());
$this->setValue('blog', $this->_blogInfo);
$this->setValue('url', $this->_blogInfo->getBlogRequestGenerator());
$this->setValue('utils', $this->_blogInfo->getBlogRequestGenerator());
$this->setValue('blogsettings', $this->_blogInfo->getSettings());
$this->setValue('rss', new RssParser());
// ask the parent to do something, if needed
parent::render();
}