PEAR_PackageUpdate::getPackageInfo

PEAR_PackageUpdate::getPackageInfo – Loads the latest package information from the channel server.

Synopsis

require_once 'PEAR/PackageUpdate.php';

boolean PEAR_PackageUpdate::getPackageInfo ( )

Description

Loads the latest package information from the channel server.

This method contacts the packages channel server using a PEAR_Remote instance. If any errors are encountered (channel server does not host the package, bad package name, etc.) they will be pushed onto the error stack.

Since version 0.5.2, protocol REST 1.0 is also supported. So we try to contact the packages channel server using a PEAR_REST instance, if this channel support the protocol, rather than default protocol XMLRPC.

Throws

throws PEAR_PACKAGEUPDATE_ERROR_NOPACKAGE, if package name was set to empty.

throws PEAR_PACKAGEUPDATE_ERROR_NOCHANNEL, if channel was set to empty.

throws PEAR_PACKAGEUPDATE_ERROR_NOINFO, when there are no information available about the package name hosted on the channel server.

Note

since 0.4.0a1

This function can not be called statically.

Return value

boolean - TRUE if the information was retrieved successfully, FALSE otherwise. Errors will be pushed onto the error stack.

Checks to see if an update is available and the user has asked not to be notified about the update. (Previous) Returns the update preferences for the current package. (Next)
Last updated: Thu, 23 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.