6.0.0-git
2024-04-24
Last Modified 2011-11-04 by Guest

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.

$remote = new Horde_Pear_Remote();

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