Re: Pyrus and SimpleChannelFrontend questions
| From: | Brett Bieber | Date: | Thu, 17 Jun 2010 13:35:31 +0000 |
| Subject: | Re: Pyrus and SimpleChannelFrontend questions | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53575@lists.php.net to get a copy of this message | ||
On Wed, Jun 16, 2010 at 9:56 AM, Michael Gauthier <mike@silverorange.com> wrote:
> Hello,
>
> I'm working features for the PEAR2 website. The site uses Pyrus and
> SimpleChannelFrontend (SCF) as the data source.
>
> I have a few of questions about Pyrus and SCF:
>
> 1. I can get package dependencies of a package using:
> $package->dependencies['required']->package
> The returned object is iterable. How come it isn't also
> countable?
It does not implement the Countable interface (yet!).
> 2. Similarly, how come I can iterate a package to get releases
> but can not count the package to count the number of releases?
It does not implement the Countable interface (yet!).
> 3. How can I get a list of maintainers for a package including
> full name and email address?
Glad you've figured this out... foreach($package->maintainer as
$handle=>$maintainer) - very easy API to use.
> 4. How can I get a list of the categories a package belongs to?
Hmm.. I don't know if I've added that in yet. I've added
category=>packages, but not the other way around.
> 5. Is there any documentation? Even the class docs in the source
> code are missing. This code is going to be hard to maintain in
> the future since there are no explanations present in the code.
The unit tests are definitely the best source, and we have very high
coverage. Please help document what you can.
--
Brett Bieber