Source for file Cli.php
Documentation is available at Cli.php
* This is the default CLI driver for PEAR_PackageUpdate.
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @package PEAR_PackageUpdate
* @author Laurent Laville <pear@laurent-laville.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id: Cli.php,v 1.4 2007/11/25 16:23:47 farell Exp $
* @link http://pear.php.net/package/PEAR_PackageUpdate
* @since File available since Release 0.6.0
* This is the default CLI driver for PEAR_PackageUpdate.
* A package to make adding self updating functionality to other
* require_once 'PEAR/PackageUpdate.php';
* // check for updates of PEAR::Config package
* $ppu =& PEAR_PackageUpdate::factory('Cli', 'Config', 'pear');
* // Check for new stable and minor changes version
* $ppu->setMinimumState(PEAR_PACKAGEUPDATE_STATE_STABLE);
* $ppu->setMinimumReleaseType(PEAR_PACKAGEUPDATE_TYPE_MINOR);
* if ($ppu->checkUpdate()) {
* // Update your local copy
* include_once 'Config.php';
* @package PEAR_PackageUpdate
* @author Laurent Laville <pear@laurent-laville.org>
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version Release: @package_version@
* @link http://pear.php.net/package/PEAR_PackageUpdate
* @since Class available since Release 0.6.0
* Cli driver class constructor
* @param string $packageName The package to update.
* @param string $channel The channel the package resides on.
* @param string $user_file (optional) file to read PEAR user-defined
* @param string $system_file (optional) file to read PEAR system-wide
* @param string $pref_file (optional) file to read PPU user-defined
$user_file = '', $system_file = '', $pref_file = '')
$user_file, $system_file, $pref_file);
* Cli driver does not redirects or exits
* to force the user to restart the application.
* Cli driver does not present any frontend when an update is needed
* @return boolean Always true
// always update the package to latest version depending of options
// see setMinimumState(), setMinimumReleaseType()
Documentation generated on Sun, 15 Jun 2008 10:30:04 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|