Bearsampp 2026.9.23
Loading...
Searching...
No Matches
PEAR.php File Reference

Go to the source code of this file.

Data Structures

class  PEAR
class  PEAR_Error

Namespaces

namespace  PEAR

Functions

 _PEAR_call_destructors ()

Variables

 $GLOBALS ['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN
 $GLOBALS ['_PEAR_default_error_options'] = E_USER_NOTICE
 $GLOBALS ['_PEAR_destructor_object_list'] = array()
 $GLOBALS ['_PEAR_error_handler_stack'] = array()
 $GLOBALS ['_PEAR_shutdown_funcs'] = array()
if(substr(PHP_OS, 0, 3)=='WIN') else
const OS_UNIX true
const PEAR_ERROR_CALLBACK 16
const PEAR_ERROR_DIE 8
const PEAR_ERROR_EXCEPTION 32
const PEAR_ERROR_PRINT 2
const PEAR_ERROR_RETURN 1
const PEAR_ERROR_TRIGGER 4
const PEAR_OS 'Unix'

Function Documentation

◆ _PEAR_call_destructors()

_PEAR_call_destructors ( )

Definition at line 803 of file PEAR.php.

804{
805 global $_PEAR_destructor_object_list;
806 if (is_array($_PEAR_destructor_object_list) &&
807 sizeof($_PEAR_destructor_object_list))
808 {
809 reset($_PEAR_destructor_object_list);
810
811 $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
812
813 if ($destructLifoExists) {
814 $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
815 }
816
817 foreach ($_PEAR_destructor_object_list as $k => $objref) {
818 $classname = get_class($objref);
819 while ($classname) {
820 $destructor = "_$classname";
821 if (method_exists($objref, $destructor)) {
822 $objref->$destructor();
823 break;
824 } else {
825 $classname = get_parent_class($classname);
826 }
827 }
828 }
829 // Empty the object list to ensure that destructors are
830 // not called more than once.
831 $_PEAR_destructor_object_list = array();
832 }
833
834 // Now call the shutdown functions
835 if (
836 isset($GLOBALS['_PEAR_shutdown_funcs']) &&
837 is_array($GLOBALS['_PEAR_shutdown_funcs']) &&
838 !empty($GLOBALS['_PEAR_shutdown_funcs'])
839 ) {
840 foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
841 call_user_func_array($value[0], $value[1]);
842 }
843 }
844}
$GLOBALS['_PEAR_default_error_mode']
Definition PEAR.php:46
static & getStaticProperty($class, $var)
Definition PEAR.php:261

References $GLOBALS.

Variable Documentation

◆ $GLOBALS [1/5]

◆ $GLOBALS [2/5]

$GLOBALS[ '_PEAR_default_error_options'] = E_USER_NOTICE

Definition at line 47 of file PEAR.php.

◆ $GLOBALS [3/5]

$GLOBALS[ '_PEAR_destructor_object_list'] = array()

Definition at line 48 of file PEAR.php.

◆ $GLOBALS [4/5]

$GLOBALS[ '_PEAR_error_handler_stack'] = array()

Definition at line 50 of file PEAR.php.

◆ $GLOBALS [5/5]

$GLOBALS[ '_PEAR_shutdown_funcs'] = array()

Definition at line 49 of file PEAR.php.

◆ else

if (substr(PHP_OS, 0, 3)=='WIN') else
Initial value:
{
define('OS_WINDOWS', false)

#-

Definition at line 40 of file PEAR.php.

◆ OS_UNIX

const OS_UNIX true

Definition at line 42 of file PEAR.php.

Referenced by PEAR_Command_Install\enableExtension().

◆ PEAR_ERROR_CALLBACK

◆ PEAR_ERROR_DIE

◆ PEAR_ERROR_EXCEPTION

const PEAR_ERROR_EXCEPTION 32

◆ PEAR_ERROR_PRINT

◆ PEAR_ERROR_RETURN

const PEAR_ERROR_RETURN 1

#+ ERROR constants

Definition at line 24 of file PEAR.php.

Referenced by PEAR_Error\__construct(), PEAR_PackageFile_v2_Validator\_analyzeBundledPackages(), PEAR_Command_Remote\_checkChannelForStatus(), PEAR_Downloader_Package\_detect1(), PEAR_Downloader_Package\_detect2Dep(), PEAR_Command_Install\_filterUptodatePackages(), PEAR_Downloader_Package\_fromFile(), PEAR_Downloader_Package\_fromString(), PEAR_Downloader_Package\_fromUrl(), PEAR_Downloader\_getDepPackageDownloadUrl(), PEAR_Downloader\_getPackageDownloadUrl(), PEAR_Installer\_parsePackageXml(), PEAR\_raiseError(), PEAR\_setErrorHandling(), PEAR_Downloader\analyzeDependencies(), PEAR_Downloader\discover(), PEAR_Command_Channels\doAdd(), PEAR_Command_Install\doBundle(), PEAR_Command_Package\doConvert(), PEAR_Command_Channels\doDiscover(), PEAR_Command_Remote\doDownload(), PEAR_Command_Mirror\doDownloadAll(), PEAR_Command_Registry\doFileList(), PEAR_Command_Channels\doInfo(), PEAR_Command_Registry\doInfo(), PEAR_Command_Install\doInstall(), PEAR_Command_Registry\doList(), PEAR_Command_Remote\doListUpgrades(), PEAR_Command_Package\doPackageValidate(), PEAR_Command_Install\doRunScripts(), PEAR_Command_Test\doRunTests(), PEAR_Command_Remote\doSearch(), PEAR_Command_Registry\doShellTest(), PEAR_Command_Install\doUninstall(), PEAR_Command_Channels\doUpdate(), PEAR_Command_Channels\doUpdateAll(), PEAR_Downloader\download(), PEAR_Downloader_Package\fromDepURL(), PEAR_PackageFile\fromTgzFile(), PEAR_PackageFile_v1\getFileContents(), PEAR_PackageFile_v2\getFileContents(), PEAR_PackageFile_v2\getInstallationFilelist(), PEAR_PackageFile_v2\installBinary(), PEAR_REST_10\listAll(), PEAR_REST_11\listAll(), PEAR_REST_10\listCategories(), PEAR_REST_10\listCategory(), PEAR_REST_10\listLatestUpgrades(), PEAR_REST_13\listLatestUpgrades(), PEAR_Downloader_Package\mergeDependencies(), PEAR_Packager\package(), PEAR_REST_10\packageInfo(), PEAR_Installer_Role_Cfg\processInstallation(), PEAR_REST\retrieveData(), PEAR_Installer\setDownloadedPackages(), PEAR_Task_Postinstallscript\startSession(), PEAR\staticPopErrorHandling(), PEAR\staticPushErrorHandling(), PEAR_Error\toString(), PEAR_PackageFile_Generator_v1\toTgz(), PEAR_PackageFile_Generator_v2\toTgz2(), PEAR_Installer\uninstall(), PEAR_Dependency2\validatePackage(), PEAR_Dependency2\validatePackageDependency(), PEAR_Common\validatePackageInfo(), and PEAR_Task_Postinstallscript\validateXml().

◆ PEAR_ERROR_TRIGGER

◆ PEAR_OS

const PEAR_OS 'Unix'

Definition at line 43 of file PEAR.php.

Referenced by PEAR_Builder\build().