[commits] [Wiki] created: Doc/Dev/HordePear/REMOTE_PEAR_SERVER

Wiki Guest wikiguest at horde.org
Fri Nov 4 20:07:21 UTC 2011


guest [92.224.22.83]  Fri, 04 Nov 2011 20:07:21 +0000

Created page: http://wiki.horde.org/Doc/Dev/HordePear/REMOTE_PEAR_SERVER

+Introduction

The Horde_Pear_Remote class provides you with high-level access to the  
REST interface of a PEAR server.

The default instance that will be created when providing no arguments  
to the constructor will allow access to the PEAR server at  
pear.horde.org. This can be easily modified by specifying an alternate  
server name as a first argument.

An optional second argument allows to specify the underlying access  
helper that converts the REST responses into object instances. Usually  
it should not be necessary to provide this parameter but there are  
examples demonstrating how this can be used further below.

<code type="php">
$remote = new Horde_Pear_Remote();
</code>

++getChannel()

Returns the channel.xml for the server as string.

++listPackages()

This returns an array with the list of package names. Use this to get  
a quick overview on what is available on the remote server.

++getLatestRelease()

For a given package name this will retrieve the latest version that  
has been released. By default the method only selects stable releases.  
The optional second parameter allows to modify this behaviour to  
specifically return the highest release version of the specified  
stability. If the stability does not matter the argument can be set to  
NULL to retrieve the highest release version independent of the  
stability.

++getLatestDownloadUri()

This will deliver the download location for the source archive of the  
latest version that has been released for the specified package.

The "stability" parameter works in the same way as for the  
getLatestRelease() method above.

++getLatestDetails()

This will deliver detailed information for the latest release of the  
specified package.

The "stability" parameter works in the same way as for the  
getLatestRelease() method above.

++releaseExists()

Checks if a release exists for the specified combination of package  
name and version number.

++getDependencies()

Returns the dependencies for the specified package version. The return  
value is an array ...?

++getPackageXml()

Returns the package.xml file wrapped as Horde_Pear_Package_Xml instance.

+Horde_Pear_Rest_Access

This class converts the REST responses into Horde_Pear_* objects that
simplify access to the data provided by the remote PEAR server.

In most cases you should be able




More information about the commits mailing list