本文整理汇总了PHP中PartKeepr\PartKeepr::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP PartKeepr::getVersion方法的具体用法?PHP PartKeepr::getVersion怎么用?PHP PartKeepr::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartKeepr\PartKeepr
的用法示例。
在下文中一共展示了PartKeepr::getVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSystemInformation
/**
* Returns a list of system information records.
*
* Please note that it is not defined which information is returned; the result
* should be seen as "informational" to the system operator, not for automated purposes.
*/
public function getSystemInformation()
{
$aData = array();
$aData[] = new SystemInformationRecord("Doctrine ORM", \Doctrine\ORM\Version::VERSION, "Libraries");
$aData[] = new SystemInformationRecord("Doctrine DBAL", \Doctrine\DBAL\Version::VERSION, "Libraries");
$aData[] = new SystemInformationRecord("PHP Version", phpversion(), "System");
$os = new OperatingSystem();
$aData[] = new SystemInformationRecord("Operating System Type", $os->getPlatform(), "System");
$aData[] = new SystemInformationRecord("Operating System Release", $os->getRelease(), "System");
$aData[] = new SystemInformationRecord("memory_limit", ini_get("memory_limit"), "PHP");
$aData[] = new SystemInformationRecord("post_max_size", ini_get("post_max_size"), "PHP");
$aData[] = new SystemInformationRecord("upload_max_filesize", ini_get("upload_max_filesize"), "PHP");
$aData[] = new SystemInformationRecord("allow_url_fopen", ini_get("allow_url_fopen"), "PHP");
$aData[] = new SystemInformationRecord("max_execution_time", ini_get("max_execution_time"), "PHP");
$queryCache = get_class(PartKeepr::getEM()->getConfiguration()->getQueryCacheImpl());
$metadataCache = get_class(PartKeepr::getEM()->getConfiguration()->getMetadataCacheImpl());
$aData[] = new SystemInformationRecord("Query Cache Implementation", $queryCache, "PHP");
$aData[] = new SystemInformationRecord("Metadata Cache Implementation", $metadataCache, "PHP");
$aData[] = new SystemInformationRecord("PartKeepr Version", PartKeepr::getVersion(), "PartKeepr");
foreach (Configuration::getOptions() as $key => $value) {
// Hide passwords
if ($key == "partkeepr.database.password" || $key == "partkeepr.migration.partdb.password") {
$value = "<hidden>";
}
$aData[] = new SystemInformationRecord($key, $value, "PartKeepr Configuration Information");
}
return array("data" => $aData);
}
示例2: doVersionCheck
/**
* Checks against the versions at partkeepr.org.
*
* If a newer version was found, create a system notice entry.
*/
public static function doVersionCheck()
{
$data = file_get_contents("http://www.partkeepr.org/versions.json");
$versions = json_decode($data, true);
if (PartKeeprVersion::PARTKEEPR_VERSION == "{V_GIT}") {
return;
}
if (substr(PartKeeprVersion::PARTKEEPR_VERSION, 0, 17) == "partkeepr-nightly") {
return;
}
if (version_compare(PartKeepr::getVersion(), $versions[0]["version"], '<')) {
SystemNoticeManager::getInstance()->createUniqueSystemNotice("PARTKEEPR_VERSION_" . $versions[0]["version"], sprintf(PartKeepr::i18n("New PartKeepr Version %s available"), $versions[0]["version"]), sprintf(PartKeepr::i18n("PartKeepr Version %s changelog:"), $versions[0]["version"]) . "\n\n" . $versions[0]["changelog"]);
}
}