当前位置: 首页>>代码示例>>PHP>>正文


PHP PartKeepr::getVersion方法代码示例

本文整理汇总了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);
 }
开发者ID:JohnEffland,项目名称:PartKeepr,代码行数:34,代码来源:SystemService.php

示例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"]);
     }
 }
开发者ID:JohnEffland,项目名称:PartKeepr,代码行数:19,代码来源:PartKeepr.php


注:本文中的PartKeepr\PartKeepr::getVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。