\Horde_Pear_Remote

Remote access to a PEAR server.

Summary

Methods
Properties
Constants
__construct()
listPackages()
getLatestRelease()
getReleases()
getDependencies()
getPackageXml()
getChannel()
releaseExists()
getLatestDownloadUri()
getLatestDetails()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_getRelease()
$_rest
N/A

Properties

$_rest

$_rest : \Horde_Pear_Rest

The instance accessing the REST interface of the PEAR server.

Type

\Horde_Pear_Rest

Methods

__construct()

__construct(string  $server = 'pear.horde.org', \Horde_Pear_Rest  $rest = null) 

Constructor

Parameters

string $server

The server name.

\Horde_Pear_Rest $rest

The accessor to the PEAR server rest interface.

listPackages()

listPackages() : array

Return the list of package names.

Returns

array —

The package names.

getLatestRelease()

getLatestRelease(string  $package, string  $stability = 'stable') : string|boolean

Return the latest release for a specific package and stability.

Parameters

string $package

The name of the package.

string $stability

The stability of the release. Must be one of "stable", "beta", "alpha", or "devel". The default is "stable" If you explicitely set the $stability parameter to NULL the method will return the highest release version independent of the stability.

Returns

string|boolean —

The latest version for this stability or false if no version with this stability level exists.

getReleases()

getReleases(string  $package) : \Horde_Pear_Rest_Releases

Returns all release for a specific package.

Parameters

string $package

The name of the package.

Returns

\Horde_Pear_Rest_Releases

A list of releases.

getDependencies()

getDependencies(string  $package, string  $version) : array

Retrieve the dependencies for the specified package release.

Parameters

string $package

The package name.

string $version

The package version.

Returns

array —

The package dependencies.

getPackageXml()

getPackageXml(string  $package, string  $version) : \Horde_Pear_Package_Xml

Return the package.xml for the specified release from the server.

Parameters

string $package

The name of the package.

string $version

The version of the release.

Returns

\Horde_Pear_Package_Xml

The package.xml handler.

getChannel()

getChannel() : string

Return the channel.xml from the server.

Returns

string —

The content of the channel.xml file.

releaseExists()

releaseExists(string  $package, string  $version) : boolean

Test if the specified release exists.

Parameters

string $package

The name of the package.

string $version

The version of the release.

Returns

boolean —

True if the release exists.

getLatestDownloadUri()

getLatestDownloadUri(string  $package, string  $stability = 'stable') : string

Retrieve the download location for the latest package release.

Parameters

string $package

The package name.

string $stability

The stability the release should have. Must be one of "stable", "beta", "alpha", or "devel". The default is "stable" If you explicitely set the $stability parameter to NULL the method will return the download URI for the highest release version independent of the stability.

Throws

\Horde_Pear_Exception

In case there is no release for this package with the specified stability level.

Returns

string —

The URI for downloading the release.

getLatestDetails()

getLatestDetails(string  $package, string  $stability = 'stable') : \Horde_Pear_Rest_Release|boolean

Retrieve the release details for the most stable package version.

Parameters

string $package

The package name.

string $stability

The stability of the release. Must be one of "stable", "beta", "alpha", or "devel". The default is "stable" If you explicitely set the $stability parameter to NULL the method will return the details for the highest release version independent of the stability.

Returns

\Horde_Pear_Rest_Release|boolean —

The details of the most stable release. Or false if no release was found.

_getRelease()

_getRelease(string  $package, string  $version) : \Horde_Pear_Rest_Release

Return the release information wrapper for a specific package version from the server.

Parameters

string $package

The name of the package.

string $version

The version of the release.

Returns

\Horde_Pear_Rest_Release

The wrapper.