Horde_Pear_Remote
in package
Remote access to a PEAR server.
Tags
Table of Contents
- $_rest : Horde_Pear_Rest
- The instance accessing the REST interface of the PEAR server.
- __construct() : mixed
- Constructor
- getChannel() : string
- Return the channel.xml from the server.
- getDependencies() : array<string|int, mixed>
- Retrieve the dependencies for the specified package release.
- getLatestDetails() : Horde_Pear_Rest_Release|bool
- Retrieve the release details for the most stable package version.
- getLatestDownloadUri() : string
- Retrieve the download location for the latest package release.
- getLatestRelease() : string|bool
- Return the latest release for a specific package and stability.
- getPackageXml() : Horde_Pear_Package_Xml
- Return the package.xml for the specified release from the server.
- getReleases() : Horde_Pear_Rest_Releases
- Returns all release for a specific package.
- listPackages() : array<string|int, mixed>
- Return the list of package names.
- releaseExists() : bool
- Test if the specified release exists.
- _getRelease() : Horde_Pear_Rest_Release
- Return the release information wrapper for a specific package version from the server.
Properties
$_rest
The instance accessing the REST interface of the PEAR server.
private
Horde_Pear_Rest
$_rest
Methods
__construct()
Constructor
public
__construct([string $server = 'pear.horde.org' ][, Horde_Pear_Rest $rest = null ]) : mixed
Parameters
- $server : string = 'pear.horde.org'
-
The server name.
- $rest : Horde_Pear_Rest = null
-
The accessor to the PEAR server rest interface.
Return values
mixed —getChannel()
Return the channel.xml from the server.
public
getChannel() : string
Return values
string —The content of the channel.xml file.
getDependencies()
Retrieve the dependencies for the specified package release.
public
getDependencies(string $package, string $version) : array<string|int, mixed>
Parameters
- $package : string
-
The package name.
- $version : string
-
The package version.
Return values
array<string|int, mixed> —The package dependencies.
getLatestDetails()
Retrieve the release details for the most stable package version.
public
getLatestDetails(string $package[, string $stability = 'stable' ]) : Horde_Pear_Rest_Release|bool
Parameters
- $package : string
-
The package name.
- $stability : string = 'stable'
-
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.
Return values
Horde_Pear_Rest_Release|bool —The details of the most stable release. Or false if no release was found.
getLatestDownloadUri()
Retrieve the download location for the latest package release.
public
getLatestDownloadUri(string $package[, string $stability = 'stable' ]) : string
Parameters
- $package : string
-
The package name.
- $stability : string = 'stable'
-
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.
Tags
Return values
string —The URI for downloading the release.
getLatestRelease()
Return the latest release for a specific package and stability.
public
getLatestRelease(string $package[, string $stability = 'stable' ]) : string|bool
Parameters
- $package : string
-
The name of the package.
- $stability : string = 'stable'
-
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.
Return values
string|bool —The latest version for this stability or false if no version with this stability level exists.
getPackageXml()
Return the package.xml for the specified release from the server.
public
getPackageXml(string $package, string $version) : Horde_Pear_Package_Xml
Parameters
- $package : string
-
The name of the package.
- $version : string
-
The version of the release.
Return values
Horde_Pear_Package_Xml —The package.xml handler.
getReleases()
Returns all release for a specific package.
public
getReleases(string $package) : Horde_Pear_Rest_Releases
Parameters
- $package : string
-
The name of the package.
Return values
Horde_Pear_Rest_Releases —A list of releases.
listPackages()
Return the list of package names.
public
listPackages() : array<string|int, mixed>
Return values
array<string|int, mixed> —The package names.
releaseExists()
Test if the specified release exists.
public
releaseExists(string $package, string $version) : bool
Parameters
- $package : string
-
The name of the package.
- $version : string
-
The version of the release.
Return values
bool —True if the release exists.
_getRelease()
Return the release information wrapper for a specific package version from the server.
private
_getRelease(string $package, string $version) : Horde_Pear_Rest_Release
Parameters
- $package : string
-
The name of the package.
- $version : string
-
The version of the release.
Return values
Horde_Pear_Rest_Release —The wrapper.