PEAR_PackageUpdate
[ class tree: PEAR_PackageUpdate ] [ index: PEAR_PackageUpdate ] [ all elements ]

Class: PEAR_PackageUpdate_Cli

Source Location: /PEAR_PackageUpdate-0.6.0/Cli.php

Class Overview

PEAR_PackageUpdate
   |
   --PEAR_PackageUpdate_Cli

This is the default CLI driver for PEAR_PackageUpdate.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2006-2007 Scott Mattocks

Methods


Inherited Variables

Inherited Methods

Class: PEAR_PackageUpdate

PEAR_PackageUpdate::PEAR_PackageUpdate()
PHP 4 style constructor. Calls the PHP 5 style constructor.
PEAR_PackageUpdate::__construct()
PHP 5 style constructor. Loads the user preferences.
PEAR_PackageUpdate::checkUpdate()
Checks to see if an update is available.
PEAR_PackageUpdate::determinePrefFile()
Returns the path to the preferences file.
PEAR_PackageUpdate::factory()
Creates an instance of the given update class.
PEAR_PackageUpdate::forceRestart()
Redirects or exits to force the user to restart the application.
PEAR_PackageUpdate::getInstalledRelease()
Returns informations about current installed version of the package
PEAR_PackageUpdate::getLatestRelease()
Returns information on latest version available
PEAR_PackageUpdate::getPackageInfo()
Returns the latest information about the given package.
PEAR_PackageUpdate::getPackagePreferences()
Returns the preferences associated with the given package.
PEAR_PackageUpdate::hasErrors()
Returns whether or not errors have occurred (and been captured).
PEAR_PackageUpdate::isIncludable()
Returns whether or not a path is in the include path.
PEAR_PackageUpdate::loadPreferences()
Loads the user's preferences from a file.
PEAR_PackageUpdate::popError()
Pops an error off the error stack.
PEAR_PackageUpdate::preferencesAllowUpdate()
Returns whether or not the user's preferences will allow an update to take place.
PEAR_PackageUpdate::presentUpdate()
Presents the user with the option to update.
PEAR_PackageUpdate::pushError()
Pushes an error onto an error stack.
PEAR_PackageUpdate::releaseType()
Returns the type of release. (bug|minor|major);
PEAR_PackageUpdate::repackagePEAR_Error()
Repackages PEAR_Errors for use with ErrorStack.
PEAR_PackageUpdate::savePreferences()
Saves the current prefernces to the RC file.
PEAR_PackageUpdate::setDontAskAgain()
Sets the user's preference for asking about all updates for this package.
PEAR_PackageUpdate::setDontAskUntilNextRelease()
Sets the user's preference for asking about updates again until the next release.
PEAR_PackageUpdate::setMinimumReleaseType()
Sets the user's preference for asking about release types.
PEAR_PackageUpdate::setMinimumState()
Sets the user's preference for asking about release states.
PEAR_PackageUpdate::setPreference()
Sets the given preference to the given value.
PEAR_PackageUpdate::setPreferences()
Sets all preferences at once.
PEAR_PackageUpdate::update()
Updates the source for the package.

Class Details

[line 56]
This is the default CLI driver for PEAR_PackageUpdate.

A package to make adding self updating functionality to other packages easy.

EXAMPLE:

  1.  <?php
  2.      require_once 'PEAR/PackageUpdate.php';
  3.      // check for updates of PEAR::Config package
  4.      $ppu =PEAR_PackageUpdate::factory('Cli''Config''pear');
  5.      if ($ppu !== false{
  6.          // Check for new stable and minor changes version
  7.          if ($ppu->checkUpdate()) {
  8.              // Update your local copy
  9.              if ($ppu->update()) {
  10.                  include_once 'Config.php';
  11.              }
  12.          }
  13.      }
  14.  ?>



[ Top ]


Method Detail

PEAR_PackageUpdate_Cli (Constructor)   [line 58]

PEAR_PackageUpdate_Cli PEAR_PackageUpdate_Cli( $packageName, $channel)


Parameters:

   $packageName   — 
   $channel   — 

[ Top ]

forceRestart   [line 63]

void forceRestart( )


Overrides PEAR_PackageUpdate::forceRestart() (Redirects or exits to force the user to restart the application.)
[ Top ]

presentUpdate   [line 67]

void presentUpdate( )


Overrides PEAR_PackageUpdate::presentUpdate() (Presents the user with the option to update.)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:54:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.