PEAR_PackageUpdate::getPackagePreferences

PEAR_PackageUpdate::getPackagePreferences – Returns the update preferences for the current package.

Synopsis

require_once 'PEAR/PackageUpdate.php';

array PEAR_PackageUpdate::getPackagePreferences ( )

Description

Returns an array of update preferences for the current package. This method is used to ensure that users are not asked about updates they do not want to be asked about.

The array returned may have up to four elements:

PEAR_PACKAGEUPDATE_PREF_NOUPDATES

if TRUE the user does not want to know about any new updates.

PEAR_PACKAGEUPDATE_PREF_NEXTRELEASE

if set, the user does not want to be asked until a version greater than the value of this element has been released.

PEAR_PACKAGEUPDATE_PREF_TYPE

if set, the user does not want to be notified unless the release is at least the given type (one of PEAR_PACKAGEUPDATE_TYPE_BUG, PEAR_PACKAGEUPDATE_TYPE_MINOR, PEAR_PACKAGEUPDATE_TYPE_MAJOR).

PEAR_PACKAGEUPDATE_PREF_STATE

if set, the user does not want to be notified unless the release has at least the given state (one of PEAR_PACKAGEUPDATE_PREF_STATE_DEVEL, PEAR_PACKAGEUPDATE_PREF_STATE_ALPHA, PEAR_PACKAGEUPDATE_PREF_STATE_BETA, PEAR_PACKAGEUPDATE_PREF_STATE_STABLE).

Note

since 0.4.0a1

This function can not be called statically.

Return value

array - an array of user preferences.

Loads the latest package information from the channel server. (Previous) Saves the user preferences to the preference file. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.