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


PHP Package::getRemotelyUpgradeablePackages方法代码示例

本文整理汇总了PHP中Package::getRemotelyUpgradeablePackages方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::getRemotelyUpgradeablePackages方法的具体用法?PHP Package::getRemotelyUpgradeablePackages怎么用?PHP Package::getRemotelyUpgradeablePackages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Package的用法示例。


在下文中一共展示了Package::getRemotelyUpgradeablePackages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view

 public function view()
 {
     Loader::library('update');
     $this->set('latest_version', Update::getLatestAvailableVersionNumber());
     $tp = new TaskPermission();
     $updates = 0;
     $local = array();
     $remote = array();
     if ($tp->canInstallPackages()) {
         $local = Package::getLocalUpgradeablePackages();
         $remote = Package::getRemotelyUpgradeablePackages();
     }
     // now we strip out any dupes for the total
     $updates = 0;
     $localHandles = array();
     foreach ($local as $_pkg) {
         $updates++;
         $localHandles[] = $_pkg->getPackageHandle();
     }
     foreach ($remote as $_pkg) {
         if (!in_array($_pkg->getPackageHandle(), $localHandles)) {
             $updates++;
         }
     }
     $this->set('updates', $updates);
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:26,代码来源:dashboard_app_status.php

示例2: view

 public function view()
 {
     $this->set('latest_version', Config::get('APP_VERSION_LATEST'));
     $tp = new TaskPermission();
     $updates = 0;
     $local = array();
     $remote = array();
     if ($tp->canInstallPackages()) {
         $local = Package::getLocalUpgradeablePackages();
         $remote = Package::getRemotelyUpgradeablePackages();
     }
     // now we strip out any dupes for the total
     $updates = 0;
     $localHandles = array();
     foreach ($local as $_pkg) {
         $updates++;
         $localHandles[] = $_pkg->getPackageHandle();
     }
     foreach ($remote as $_pkg) {
         if (!in_array($_pkg->getPackageHandle(), $localHandles)) {
             $updates++;
         }
     }
     $this->set('updates', $updates);
 }
开发者ID:rmxdave,项目名称:concrete5,代码行数:25,代码来源:controller.php

示例3: sortAvailableArray

	function sortAvailableArray($obj1, $obj2) {
		$name1 = ($obj1 instanceof Package) ? $obj1->getPackageName() : $obj1->getBlockTypeName();
		$name2 = ($obj2 instanceof Package) ? $obj2->getPackageName() : $obj2->getBlockTypeName();
		return strcasecmp($name1, $name2);
	}
	
	// grab the total numbers of updates.
	// this consists of 
	// 1. All packages that have greater pkgAvailableVersions than pkgVersion
	// 2. All packages that have greater pkgVersion than getPackageCurrentlyInstalledVersion
	$local = array();
	$remote = array();
	$pkgAvailableArray = array();
	if ($tp->canInstallPackages()) { 
		$local = Package::getLocalUpgradeablePackages();
		$remote = Package::getRemotelyUpgradeablePackages();
	}
	
	// now we strip out any dupes for the total
	$updates = 0;
	$localHandles = array();
	foreach($local as $_pkg) {
		$updates++;
		$localHandles[] = $_pkg->getPackageHandle();
	}
	foreach($remote as $_pkg) {
		if (!in_array($_pkg->getPackageHandle(), $localHandles)) {
			$updates++;
		}
	}
	if ($tp->canInstallPackages()) { 
开发者ID:notzen,项目名称:concrete5,代码行数:31,代码来源:install.php


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