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 ( )

Описание

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.

Замечание

since 0.4.0a1

This function can not be called statically.

Return value

boolean - TRUE if the information was retrieved successfully, FALSE otherwise. Ошибки will be pushed onto the error stack.

    Поддержать сайт на родительском проекте КГБ