Class: PEAR_PackageUpdate
Source Location: /PEAR_PackageUpdate-1.1.0RC1/PackageUpdate.php
The package allows a developer to add a few lines of code to
Author(s):
Version:
Copyright:
- 2006-2009 Scott Mattocks, Laurent Laville
|
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 417]
void __construct(
string
$packageName, string
$channel, [string
$user_file = ''], [string
$system_file = ''], [string
$pref_file = ''])
|
|
PHP 5 style constructor. Loads the user preferences.
Parameters:
PEAR_PackageUpdate (Constructor) [line 393]
void PEAR_PackageUpdate(
string
$packageName, string
$channel, [string
$user_file = ''], [string
$system_file = ''], [string
$pref_file = ''])
|
|
PHP 4 style constructor. Calls the PHP 5 style constructor.
Parameters:
addAdapter [line 1439]
bool addAdapter(
string
$adapter, int
$priority)
|
|
Add an interface adapter Add an interface adapter to communicate with remote server. API 1.0.x did not support adapters yet API 1.1.0 support only 3 adapters (REST, XmlRPC and Soap) IMPORTANT: Soap adapter is not provided
Parameters:
checkUpdate [line 661]
Checks to see if an update is available. Respects the user preferences when determining if an update is available. Returns true if an update is available and the user may want to update the package.
determinePrefFile [line 624]
string determinePrefFile(
)
|
|
Returns the path to the preferences file.
factory [line 486]
object An &factory(
string
$driver, string
$packageName, string
$channel, [string
$user_file = ''], [string
$system_file = ''], [string
$pref_file = ''])
|
|
Creates an instance of the given update class.
Parameters:
forceRestart [line 1273]
Redirects or exits to force the user to restart the application.
Overridden in child classes as:
- PEAR_PackageUpdate_Cli::forceRestart()
- Cli driver does not redirects or exits to force the user to restart the application.
getInstalledRelease [line 949]
array|bool getInstalledRelease(
)
|
|
Returns informations about current installed version of the package
getLatestRelease [line 1014]
array|bool getLatestRelease(
)
|
|
Returns information on latest version available
getPackageInfo [line 694]
boolean getPackageInfo(
)
|
|
Returns the latest information about the given package.
getPackagePreferences [line 783]
array getPackagePreferences(
)
|
|
Returns the preferences associated with the given package. The preferences returned are an array with the folling values: - don't ask again
- don't ask until next version
- only ask for state x
- bug/minor/major updates only
hasErrors [line 1417]
boolean hasErrors(
[string|array
$level = false])
|
|
Returns whether or not errors have occurred (and been captured).
Parameters:
isIncludable [line 536]
boolean isIncludable(
string
$path)
|
|
Returns whether or not a path is in the include path.
Parameters:
loadPreferences [line 568]
boolean loadPreferences(
[string
$pref_file = ''])
|
|
Loads the user's preferences from a file. The preferences are stored in the user's home directory as the file .ppurc. The file contains a serialized array of preferences for each package that has been checked for updates so far.
Parameters:
popError [line 1400]
Pops an error off the error stack. This method is just for collecting errors that occur while checking for updates and updating a package. The child class is responsible for displaying all errors and handling them properly. This is because the way errors are handled varies greatly depending on the driver used.
preferencesAllowUpdate [line 859]
boolean preferencesAllowUpdate(
)
|
|
Returns whether or not the user's preferences will allow an update to take place. The user's preferences may define restrictions such as: - don't update
- don't ask until next version (remembers last version asked)
- only ask for state XXXX or higher
- minor or higher (no bug fix)
- major only
presentUpdate [line 1289]
pushError [line 1326]
PEAR_Error|array|Exception pushError(
int
$code, [string
$level = 'error'], [array
$params = array()], [string
$msg = false], [array
$repackage = false], [array
$backtrace = false])
|
|
Pushes an error onto an error stack. This method is just for collecting errors that occur while checking for updates and updating a package. The child class is responsible for displaying all errors and handling them properly. This is because the way errors are handled varies greatly depending on the driver used.
Parameters:
releaseType [line 924]
Returns the type of release. (bug|minor|major);
repackagePEARError [line 1357]
mixed repackagePEARError(
object
&$error)
|
|
Repackages PEAR_Errors for use with ErrorStack.
Parameters:
savePreferences [line 804]
boolean savePreferences(
[string
$pref_file = ''])
|
|
Saves the current preferences to the RC file.
Parameters:
setDontAskAgain [line 1034]
boolean setDontAskAgain(
boolean
$dontAsk)
|
|
Sets the user's preference for asking about all updates for this package.
Parameters:
setDontAskUntilNextRelease [line 1054]
boolean setDontAskUntilNextRelease(
boolean
$nextrelease)
|
|
Sets the user's preference for asking about updates again until the next release.
Parameters:
setMinimumReleaseType [line 1082]
boolean setMinimumReleaseType(
string
$minType)
|
|
Sets the user's preference for asking about release types.
Parameters:
setMinimumState [line 1108]
boolean setMinimumState(
string
$minState)
|
|
Sets the user's preference for asking about release states.
Parameters:
setPreference [line 1140]
boolean setPreference(
integer
$pref, mixed
$value)
|
|
Sets the given preference to the given value. Don't take any chances. Anytime a preference is set, the preferences are saved. We can't rely on the developer to call savePreferences.
Parameters:
setPreferences [line 1180]
boolean setPreferences(
array
$preferences)
|
|
Sets all preferences at once.
Parameters:
update [line 1224]
Updates the source for the package. We have to update required dependencies automatically to make sure that everything still works properly. It is the developers responsibility to make sure the user is given the option to update any optional dependencies if needed. This can be done by creating a new instance of PEAR_PackageUpdate for the optional dependency.
Documentation generated on Mon, 11 Mar 2019 15:31:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|