當前位置: 首頁>>代碼示例>>PHP>>正文


PHP xPDO::getVersionData方法代碼示例

本文整理匯總了PHP中xPDO::getVersionData方法的典型用法代碼示例。如果您正苦於以下問題:PHP xPDO::getVersionData方法的具體用法?PHP xPDO::getVersionData怎麽用?PHP xPDO::getVersionData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在xPDO的用法示例。


在下文中一共展示了xPDO::getVersionData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkDependencies

 /**
  * Check dependency constraints for the package.
  *
  * @param array $dependencies An array of dependencies to check.
  *
  * @return array An array of unsatisfied dependencies.
  */
 public function checkDependencies(array $dependencies)
 {
     $unsatisfied = array();
     $dependencies = xPDOTransport::checkPlatformDependencies($dependencies);
     foreach ($dependencies as $package => $constraint) {
         if (strtolower($package) === strtolower($this->identifier)) {
             continue;
         }
         switch (strtolower($package)) {
             case 'modx':
                 $versionData = $this->xpdo->getVersionData();
                 if (!xPDOTransport::satisfies($versionData['full_version'], $constraint)) {
                     $unsatisfied[$package] = $constraint;
                 }
                 break;
             default:
                 /* get latest installed package version */
                 $latestQuery = $this->xpdo->newQuery('modTransportPackage', array(array("UCASE({$this->xpdo->escape('package_name')}) LIKE UCASE({$this->xpdo->quote($package)})"), 'installed:IS NOT' => null));
                 $latestQuery->sortby('installed', 'DESC');
                 /** @var modTransportPackage $latest */
                 $latest = $this->xpdo->getObject('modTransportPackage', $latestQuery);
                 if ($latest) {
                     $latest->parseSignature();
                     if (xPDOTransport::satisfies($latest->version, $constraint)) {
                         unset($latest);
                         continue;
                     }
                 }
                 $unsatisfied[$package] = $constraint;
                 break;
         }
     }
     return $unsatisfied;
 }
開發者ID:ChrstnMgcn,項目名稱:revolution,代碼行數:41,代碼來源:modtransportpackage.class.php

示例2: args

 protected function args(array $args = array())
 {
     if (!is_array($this->xpdo->version)) {
         $this->xpdo->getVersionData();
     }
     $baseArgs = array('api_key' => $this->get('api_key'), 'username' => $this->get('username'), 'uuid' => $this->xpdo->uuid, 'database' => $this->xpdo->config['dbtype'], 'revolution_version' => $this->xpdo->version['code_name'] . '-' . $this->xpdo->version['full_version'], 'supports' => $this->xpdo->version['code_name'] . '-' . $this->xpdo->version['full_version'], 'http_host' => $this->xpdo->getOption('http_host'), 'php_version' => XPDO_PHP_VERSION, 'language' => $this->xpdo->getOption('manager_language'));
     return array_merge($baseArgs, $args);
 }
開發者ID:modxcustomize,項目名稱:Clickatell,代碼行數:8,代碼來源:modtransportprovider.class.php


注:本文中的xPDO::getVersionData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。