API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5

Référence de la classe PEAR

Graphe d'héritage de PEAR:

Liste de tous les membres

Fonctions membres publiques

Attributs publics


Documentation des fonctions membres

PEAR::_checkDelExpect ( error_code)

This method checks unsets an error code if available

Paramètres:
mixederror code
Renvoie:
bool true if the error code was unset, false otherwise private
Depuis:
PHP 4.3.0

Référencé par delExpect().

Voici le graphe d'appel pour cette fonction :

PEAR::_PEAR ( )

Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

See the note in the class desciption about output from destructors.

public

Renvoie:
void
PEAR::delExpect ( error_code)

This method deletes all occurences of the specified element from the expected error codes stack.

Paramètres:
mixed$error_codeerror code that should be deleted
Renvoie:
mixed list of error codes that were deleted or error public
Depuis:
PHP 4.3.0

Références $error, _checkDelExpect(), elseif, et raiseError().

Voici le graphe d'appel pour cette fonction :

PEAR::expectError ( code = '*')

This method is used to tell which errors you expect to get. Expected errors are always returned with error mode PEAR_ERROR_RETURN. Expected error codes are stored in a stack, and this method pushes a new element onto it. The list of expected errors are in effect until they are popped off the stack with the popExpect() method.

Note that this method can not be called statically

Paramètres:
mixed$codea single error code or an array of error codes to expect
Renvoie:
int the new depth of the "expected errors" stack public
& PEAR::getStaticProperty ( class,
var 
)

If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. Eg. in your method(s) do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); You MUST use a reference, or they will not persist!

public

Paramètres:
string$classThe calling classname, to prevent clashes
string$varThe variable to retrieve.
Renvoie:
mixed A reference to the variable. If not set it will be auto initialised to NULL.

Références $class.

Référencé par _PEAR_call_destructors(), et PEAR_Error::PEAR_Error().

Voici le graphe d'appel pour cette fonction :

PEAR::isError ( data,
code = null 
)

Tell whether a value is a PEAR error.

Paramètres:
mixed$datathe value to test
int$codeif $data is an error object, return true only if $code is a string and $obj->getMessage() == $code or $code is an integer and $obj->getCode() == $code public
Renvoie:
bool true if parameter is an error

Références $data, et elseif.

Référencé par patTemplate_Reader_DB::getDataFromDb(), et Auth_OpenID_SQLStore::isError().

Voici le graphe d'appel pour cette fonction :

PEAR::loadExtension ( ext)

OS independant PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.

Paramètres:
string$extThe extension name
Renvoie:
bool Success or not on the dl() call

Références $ext, $suffix, et elseif.

Référencé par Archive_Tar::Archive_Tar().

Voici le graphe d'appel pour cette fonction :

PEAR::PEAR ( error_class = null)

Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.

Paramètres:
string$error_class(optional) which class to use for error objects, defaults to PEAR_Error. public
Renvoie:
void

Références $classname, et $GLOBALS.

PEAR::popErrorHandling ( )

Pop the last error handler used

Renvoie:
bool Always true
Voir également:
PEAR::pushErrorHandling

Références $GLOBALS, et setErrorHandling().

Voici le graphe d'appel pour cette fonction :

PEAR::popExpect ( )

This method pops one element off the expected error codes stack.

Renvoie:
array the list of error codes that were popped
PEAR::pushErrorHandling ( mode,
options = null 
)

Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.

Paramètres:
mixed$mode(same as setErrorHandling)
mixed$options(same as setErrorHandling)
Renvoie:
bool Always true
Voir également:
PEAR::setErrorHandling

Références $GLOBALS, et setErrorHandling().

Voici le graphe d'appel pour cette fonction :

& PEAR::raiseError ( message = null,
code = null,
mode = null,
options = null,
userinfo = null,
error_class = null,
skipmsg = false 
)

This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.

Paramètres:
mixed$messagea text error message or a PEAR error object
int$codea numeric error code (it is up to your class to define these if you want to use codes)
int$modeOne of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION.
mixed$optionsIf $mode is PEAR_ERROR_TRIGGER, this parameter specifies the PHP-internal error level (one of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). If $mode is PEAR_ERROR_CALLBACK, this parameter specifies the callback function or method. In other error modes this parameter is ignored.
string$userinfoIf you need to pass along for example debug information, this parameter is meant for that.
string$error_classThe returned error object will be instantiated from this class, if specified.
bool$skipmsgIf true, raiseError will only pass error codes, the error message parameter will be dropped.

public

Renvoie:
object a PEAR error object
Voir également:
PEAR::setErrorHandling
Depuis:
PHP 4.0.5

Références $GLOBALS, et elseif.

Référencé par delExpect(), et throwError().

Voici le graphe d'appel pour cette fonction :

PEAR::registerShutdownFunc ( func,
args = array() 
)

Use this function to register a shutdown method for static classes.

public

Paramètres:
mixed$funcThe function name (or array of class/method) to call
mixed$argsThe arguments to pass to the function
Renvoie:
void

Références $GLOBALS.

PEAR::setErrorHandling ( mode = null,
options = null 
)

Sets how errors generated by this object should be handled. Can be invoked both in objects and statically. If called statically, setErrorHandling sets the default behaviour for all PEAR objects. If called in an object, setErrorHandling sets the default behaviour for that object.

Paramètres:
int$modeOne of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION.
mixed$optionsWhen $mode is PEAR_ERROR_TRIGGER, this is the error level (one of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).

When $mode is PEAR_ERROR_CALLBACK, this parameter is expected to be the callback function or method. A callback function is a string with the name of the function, a callback method is an array of two elements: the element at index 0 is the object, and the element at index 1 is the name of the method to call in the object.

When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is a printf format string used when printing the error message.

public

Renvoie:
void
Voir également:
PEAR_ERROR_RETURN
PEAR_ERROR_PRINT
PEAR_ERROR_TRIGGER
PEAR_ERROR_DIE
PEAR_ERROR_CALLBACK
PEAR_ERROR_EXCEPTION
Depuis:
PHP 4.0.5

Références $GLOBALS.

Référencé par popErrorHandling(), et pushErrorHandling().

Voici le graphe d'appel pour cette fonction :

PEAR::staticPopErrorHandling ( )

Références $GLOBALS.

PEAR::staticPushErrorHandling ( mode,
options = null 
)

Références $GLOBALS.

& PEAR::throwError ( message = null,
code = null,
userinfo = null 
)

Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.

Paramètres:
string$message

Références raiseError().

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

PEAR::$_debug = false
PEAR::$_default_error_handler = ''
PEAR::$_default_error_mode = null
PEAR::$_default_error_options = null
PEAR::$_error_class = 'PEAR_Error'
PEAR::$_expected_errors = array()

La documentation de cette classe a été générée à partir du fichier suivant :