[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/setup/ -> PEAR.php (sommaire)

(pas de description)

Poids: 793 lignes (24 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

PEAR:: (10 méthodes):
  PEAR()
  _PEAR()
  isError()
  setErrorHandling()
  expectError()
  popExpect()
  raiseError()
  pushErrorHandling()
  popErrorHandling()
  _PEAR_call_destructors()

PEAR_Error:: (10 méthodes):
  PEAR_Error()
  getMode()
  getCallback()
  getMessage()
  getCode()
  getType()
  getUserInfo()
  getDebugInfo()
  addUserInfo()
  toString()


Classe: PEAR  - X-Ref

Base class for other PEAR classes.  Provides rudimentary
emulation of destructors.

If you want a destructor in your class, inherit PEAR and make a
destructor method called _yourclassname (same name as the
constructor, but with a "_" prefix).  Also, in your constructor you
have to call the PEAR constructor: $this->PEAR();.
The destructor method will be called without parameters.  Note that
at in some SAPI implementations (such as Apache), any output during
the request shutdown (in which destructors are called) seems to be
discarded.  If you need to get any debug information from your
destructor, use error_log(), syslog() or something similar.

PEAR($error_class = null)   X-Ref
Constructor.  Registers this object in
$_PEAR_destructor_object_list for destructor emulation if a
destructor object exists.

param: string      (optional) which class to use for error objects,
return: void

_PEAR()   X-Ref
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.

return: void

isError($data)   X-Ref
Tell whether a value is a PEAR error.

param: mixed   the value to test
return: bool    true if parameter is an error

setErrorHandling($mode = null, $options = null)   X-Ref
Sets how errors generated by this DB 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: int $mode
param: mixed $options
return: void

expectError($code = "*")   X-Ref
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.

param: mixed    a single error code or an array of error codes
return: int     the new depth of the "expected errors" stack

popExpect()   X-Ref
This method pops one element off the expected error codes
stack.

return: array   the list of error codes that were popped

raiseError($message = null,$code = null,$mode = null,$options = null,$userinfo = null,$error_class = null,$skipmsg = false)   X-Ref
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: $message  a text error message or a PEAR error object
param: $code     a numeric error code (it is up to your class
param: $mode     One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
param: $options  If $mode is PEAR_ERROR_TRIGGER, this parameter
param: $userinfo If you need to pass along for example debug
param: $error_class The returned error object will be instantiated
param: $skipmsg  If true, raiseError will only pass error codes,
return: object   a PEAR error object

pushErrorHandling($mode, $options = null)   X-Ref
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: $mode mixed (same as setErrorHandling)
param: $options mixed (same as setErrorHandling)
return: bool Always true

popErrorHandling()   X-Ref
Pop the last error handler used

return: bool Always true

_PEAR_call_destructors()   X-Ref
Pas de description

Classe: PEAR_Error  - X-Ref

PEAR_Error($message = 'unknown error', $code = null,$mode = null, $options = null, $userinfo = null)   X-Ref
PEAR_Error constructor

param: $message error message
param: $code (optional) error code
param: $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
param: $level (optional) error level, _OR_ in the case of

getMode()   X-Ref
Get the error mode from an error object.

return: int error mode

getCallback()   X-Ref
Get the callback function/method from an error object.

return: mixed callback function or object/method array

getMessage()   X-Ref
Get the error message from an error object.

return: string  full error message

getCode()   X-Ref
Get error code from an error object

return: int error code

getType()   X-Ref
Get the name of this error/exception.

return: string error/exception name (type)

getUserInfo()   X-Ref
Get additional user-supplied information.

return: string user-supplied information

getDebugInfo()   X-Ref
Get additional debug information supplied by the application.

return: string debug information

addUserInfo($info)   X-Ref
Pas de description

toString()   X-Ref
Make a string representation of this object.

return: string a string with an object summary



Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7