![]() |
Bearsampp 2026.9.23
|
The OS_Guess class
PHP versions 4 and 5
require_once 'PEAR/Exception.php'; class Test {
function foo() {
throw new PEAR_Exception('Error Message', ERROR_CODE);
}
}
function myLogger($pear_exception) {
echo $pear_exception->getMessage();
}
// each time a exception is thrown the 'myLogger' will be called
// (its use is completely optional)
PEAR_Exception::addObserver('myLogger');
$test = new Test;
try {
$test->foo();
} catch (PEAR_Exception $e) {
print $e;
}
Tomas V.V.Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Hans Lellelid hans@.nosp@m.velu.nosp@m.m.net Bertrand Mansion bmans.nosp@m.ion@.nosp@m.mamas.nosp@m.am.c.nosp@m.om Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.3.3 PEAR_Frontend, the singleton-based frontend for user input/output PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 Singleton-based frontend for PEAR user input/output Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_Frontend_CLI PHP versions 4 and 5 Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 0.1 base class Command-line Frontend for the PEAR Installer Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 0.1 PEAR_Installer PHP versions 4 and 5 Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Tomas V.V. Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Martin Jansen mj@ph.nosp@m.p.ne.nosp@m.t Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 0.1 Administration class used to install PEAR packages and maintain the installed package database. Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Tomas V.V. Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Martin Jansen mj@ph.nosp@m.p.ne.nosp@m.t Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 0.1 PEAR_Installer_Role PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 base class for installer roles Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_Installer_Role_Cfg PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 2007-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.7.0 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 2007-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.7.0 Base class for all installation roles. PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2006 The PHP Group http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 Base class for all installation roles. This class allows extensibility of file roles. Packages with complex customization can now provide custom file roles along with the possibility of adding configuration values to match. Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2006 The PHP Group http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_Installer_Role_Data PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_Installer_Role_Doc PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Ext PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Man PHP versions 4 and 5 Hannes Magnusson bjori.nosp@m.@php.nosp@m..net 2011 The Authors http://opensource.org/licenses/bsd-license.php New BSD License SVN: http://pear.php.net/package/PEAR File available since Release 1.10.0 Hannes Magnusson bjori.nosp@m.@php.nosp@m..net 2011 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.10.0 PEAR_Installer_Role_Php PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Script PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Src PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Test PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 PEAR_Installer_Role_Www PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 2007-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.7.0 PEAR_PackageFile, package.xml parsing utility class PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 Abstraction for the package.xml package description file Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 package.xml generation class, package.xml version 1.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 needed for PEAR_VALIDATE_* constants This class converts a PEAR_PackageFile_v1 object into any output format. Supported output formats include array, XML string, and a PEAR_PackageFile_v2 object, for converting package.xml 1.0 into package.xml 2.0 with no sweat. Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 package.xml generation class, package.xml version 2.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net Stephan Schmidt (original XML_Serializer code) 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 file/dir manipulation routines This class converts a PEAR_PackageFile_v2 object into any output format. Supported output formats include array, XML string (using S. Schmidt's XML_Serializer, slightly customized) Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net Stephan Schmidt (original XML_Serializer code) 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 package.xml parsing class, package.xml version 1.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 package.xml abstraction class Parser for package.xml version 1.0 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: -VER@ http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 package.xml parsing class, package.xml version 2.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 base xml parser class Parser for package.xml version 2.0 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: -VER@ http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_PackageFile_v1, package.xml version 1.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 package.xml encapsulator Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_PackageFile_v2, package.xml version 2.0 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 For error handling Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_PackageFile_v2, package.xml version 2.0, read/write version PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a8 For base class Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a8 Private validation class used by PEAR_PackageFile_v2 - do not use directly, its sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a8 private PEAR_Packager for generating releases PHP versions 4 and 5 Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Tomas V. V. Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 0.1 base class Administration class used to make a PEAR release tarball. Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 0.1 PEAR_Proxy HTTP Proxy handling Nico Boehr 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR PEAR_Registry PHP versions 4 and 5 Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Tomas V. V. Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 0.1 Administration class used to maintain the installed package database. Stig Bakken ssb@p.nosp@m.hp.n.nosp@m.et Tomas V. V. Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_REST PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 For downloading xml files Intelligently retrieve data, following hyperlinks if necessary, and re-directing as well Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a1 PEAR_REST_10 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a12 For downloading REST xml/txt files Implement REST 1.0 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a12 PEAR_REST_11 - implement faster list-all/remote-list command PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.3 For downloading REST xml/txt files Implement REST 1.1 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.3 PEAR_REST_13 PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a12 For downloading REST xml/txt files Implement REST 1.3 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.4.0a12 PEAR_RunTest PHP versions 4 and 5 Tomas V.V.Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.3.3 Simplified version of PHP's test suite Try it with: $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' Tomas V.V.Cox cox@i.nosp@m.decn.nosp@m.et.co.nosp@m.m Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License Release: 1.10.18 http://pear.php.net/package/PEAR Class available since Release 1.3.3 PEAR_Task_Common, base class for installer tasks PHP versions 4 and 5 Greg Beaver cello.nosp@m.g@ph.nosp@m.p.net 1997-2009 The Authors http://opensource.org/licenses/bsd-license.php New BSD License http://pear.php.net/package/PEAR File available since Release 1.4.0a1 A task is an operation that manipulates the contents of a file. Simple tasks operate on 1 file. Multiple tasks are executed after all files have been processed and installed, and are designed to operate on all files containing the task. The Post-install script task simply takes advantage of the fact that it will be run after installation, replace is a simple task. Combining tasks is possible, but ordering is significant. <tasks:replace from="@data-dir@" to="data_dir" type="pear-config"/> <tasks:postinstallscript/> </file>This will first replace any instance of @data-dir@ in the test.php file with the path to the current data directory. Then, it will include the test.php file and run the script it contains to configure the package post-installation.