Source for file withoutFrontend.php
Documentation is available at withoutFrontend.php
* Always keep your application up-to-date with the most recent and stable version
* @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: withoutFrontend.php,v 1.8 2007/11/25 16:37:36 farell Exp $
* @link http://pear.php.net/package/PEAR_PackageUpdate
* @since File available since Release 0.5.0
require_once 'PEAR/PackageUpdate.php';
* This class allow to use PEAR_PackageUpdate as backend without any frontend.
* No end-user action needed.
* 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
function PEAR_PackageUpdate_Null ($packageName, $channel,
$user_file = '', $system_file = '', $pref_file = '')
parent ::PEAR_PackageUpdate ($packageName, $channel,
$user_file, $system_file, $pref_file);
* Null driver always redirects to current script
* to force the user to restart the application.
// removes warning message given by pear installer
header('Location: ' . $_SERVER['PHP_SELF']);
// Check for updates of PEAR::Log package though pear.php.net channel
// Check for new stable version
if ($ppu->checkUpdate ()) {
// Update your local copy
// If the update succeeded, the application should be restarted.
$error = $ppu->popError ();
echo "<b>Error occured when trying to update: PEAR::Log package</b> <br />\n";
echo "<b>Message:</b> " . $error['message'] . "<br />\n";
if (isset ($error['context']) {
echo "<hr /><i>Context:</i><br />\n";
echo "<b>File:</b> " . $error['context']['file'] . "<br />\n";
echo "<b>Line:</b> " . $error['context']['line'] . "<br />\n";
echo "<b>Function:</b> " . $error['context']['function'] . "<br />\n";
echo "<b>Class:</b> " . $error['context']['class'] . "<br />\n";
// your application code goes here ...
Documentation generated on Sun, 15 Jun 2008 10:30:07 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|