svn: /pear2/Pyrus/trunk/src/Pyrus/Channel/ RemotePackages.php
| From: | Brett Bieber | Date: | Tue, 16 Mar 2010 14:52:22 +0000 |
| Subject: | svn: /pear2/Pyrus/trunk/src/Pyrus/Channel/ RemotePackages.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9306@lists.php.net to get a copy of this message | ||
saltybeagle Tue, 16 Mar 2010 14:52:22 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=296279
Log:
alignment/readability
Changed paths:
U pear2/Pyrus/trunk/src/Pyrus/Channel/RemotePackages.php
Modified: pear2/Pyrus/trunk/src/Pyrus/Channel/RemotePackages.php
===================================================================
--- pear2/Pyrus/trunk/src/Pyrus/Channel/RemotePackages.php 2010-03-16 14:48:09 UTC (rev 296278)
+++ pear2/Pyrus/trunk/src/Pyrus/Channel/RemotePackages.php 2010-03-16 14:52:22 UTC (rev 296279)
@@ -29,6 +29,13 @@
protected $parent;
public $stability = null;
protected $rest;
+
+ /**
+ * The list of packages, usually from p/packages.xml unless a stability
+ * flag is set and the list is filtered.
+ *
+ * @var array
+ */
protected $packageList;
function __construct(\pear2\Pyrus\ChannelInterface $channelinfo)
@@ -77,8 +84,9 @@
{
if ($this->stability) {
$info = current($this->packageList);
+
$lowerpackage = $info[0];
- $releases = $info[1];
+ $releases = $info[1];
} else {
$lowerpackage = current($this->packageList);
}
@@ -88,16 +96,17 @@
$url = $this->parent->protocols->rest['REST1.0']->baseurl .
'p/' . $lowerpackage . '/info.xml';
$info = $this->rest->retrieveCacheFirst($url);
+
if (isset($releases)) {
$pxml = new RemotePackage($this->parent, $releases);
} else {
$pxml = new RemotePackage($this->parent);
}
- $pxml->channel = $info['c'];
- $pxml->name = $info['n'];
- $pxml->license = $info['l'];
- $pxml->summary = $info['s'];
+ $pxml->channel = $info['c'];
+ $pxml->name = $info['n'];
+ $pxml->license = $info['l'];
+ $pxml->summary = $info['s'];
$pxml->description = $info['d'];
return $pxml;
}
@@ -136,11 +145,13 @@
$url = $this->parent->protocols->rest['REST1.0']->baseurl .
'p/' . $lowerpackage . '/info.xml';
$info = $this->rest->retrieveCacheFirst($url);
+
$pxml = new RemotePackage($this->parent, $releases);
- $pxml->channel = $info['c'];
- $pxml->name = $info['n'];
- $pxml->license = $info['l'];
- $pxml->summary = $info['s'];
+
+ $pxml->channel = $info['c'];
+ $pxml->name = $info['n'];
+ $pxml->license = $info['l'];
+ $pxml->summary = $info['s'];
$pxml->description = $info['d'];
return $pxml;
}