TYPO3  7.6
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
PEAR_Exception Class Reference
Inheritance diagram for PEAR_Exception:
HTTP_Request2_Exception HTTP_Request2_ConnectionException HTTP_Request2_LogicException HTTP_Request2_MessageException HTTP_Request2_NotImplementedException

Public Member Functions

 __construct ($message, $p2=null, $p3=null)
 
 getErrorData ()
 
 getCause ()
 
 getCauseMessage (&$causes)
 
 getTraceSafe ()
 
 getErrorClass ()
 
 getErrorMethod ()
 
 __toString ()
 
 toHtml ()
 
 toText ()
 

Static Public Member Functions

static addObserver ($callback, $label= 'default')
 
static removeObserver ($label= 'default')
 
static getUniqueId ()
 

Public Attributes

const OBSERVER_PRINT = -2
 
const OBSERVER_TRIGGER = -4
 
const OBSERVER_DIE = -8
 

Protected Member Functions

 signal ()
 

Protected Attributes

 $cause
 

Private Attributes

 $_trace
 

Static Private Attributes

static $_observers = array()
 
static $_uniqueid = 0
 

Detailed Description

Definition at line 95 of file vendor/pear/pear_exception/PEAR/Exception.php.

Constructor & Destructor Documentation

__construct (   $message,
  $p2 = null,
  $p3 = null 
)

Supported signatures:

Parameters
string$messageexception message
int | Exception | PEAR_Error | array | null$p2exception cause
int | null$p3exception code or null

Definition at line 120 of file vendor/pear/pear_exception/PEAR/Exception.php.

References elseif, and signal().

Member Function Documentation

__toString ( )

Converts the exception to a string (HTML or plain text)

Returns
string String representation
See Also
toHtml()
toText()

Definition at line 363 of file vendor/pear/pear_exception/PEAR/Exception.php.

References toHtml(), and toText().

static addObserver (   $callback,
  $label = 'default' 
)
static

Add an exception observer

Parameters
mixed$callback- A valid php callback, see php func is_callable()
  • A PEAR_Exception::OBSERVER_* constant
  • An array(const PEAR_Exception::OBSERVER_*, mixed $options)
string$labelThe name of the observer. Use this if you want to remove it later with removeObserver()
Returns
void

Definition at line 161 of file vendor/pear/pear_exception/PEAR/Exception.php.

getCause ( )

Returns the exception that caused this exception to be thrown

Returns
Exception|array The context of the exception

Definition at line 245 of file vendor/pear/pear_exception/PEAR/Exception.php.

References $cause.

getCauseMessage ( $causes)

Function must be public to call on caused exceptions

Parameters
array$causesArray that gets filled.
Returns
void

Definition at line 257 of file vendor/pear/pear_exception/PEAR/Exception.php.

References $cause, elseif, and getTraceSafe().

Referenced by toHtml(), and toText().

getErrorClass ( )

Gets the first class of the backtrace

Returns
string Class name

Definition at line 338 of file vendor/pear/pear_exception/PEAR/Exception.php.

References getTraceSafe().

getErrorData ( )

Return specific error information that can be used for more detailed error messages or translation.

This method may be overridden in child exception classes in order to add functionality not present in PEAR_Exception and is a placeholder to define API

The returned array must be an associative array of parameter => value like so:

array('name' => $name, 'context' => array(...))
Returns
array

Definition at line 235 of file vendor/pear/pear_exception/PEAR/Exception.php.

getErrorMethod ( )

Gets the first method of the backtrace

Returns
string Method/function name

Definition at line 349 of file vendor/pear/pear_exception/PEAR/Exception.php.

References getTraceSafe().

getTraceSafe ( )

Build a backtrace and return it

Returns
array Backtrace

Definition at line 321 of file vendor/pear/pear_exception/PEAR/Exception.php.

References $_trace.

Referenced by getCauseMessage(), getErrorClass(), getErrorMethod(), and toHtml().

static getUniqueId ( )
static

Generate a unique ID for an observer

Returns
int unique identifier for an observer

Definition at line 183 of file vendor/pear/pear_exception/PEAR/Exception.php.

static removeObserver (   $label = 'default')
static

Remove an exception observer

Parameters
string$labelName of the observer
Returns
void

Definition at line 173 of file vendor/pear/pear_exception/PEAR/Exception.php.

signal ( )
protected

Send a signal to all observers

Returns
void

Definition at line 193 of file vendor/pear/pear_exception/PEAR/Exception.php.

Referenced by __construct().

toHtml ( )

Generates a HTML representation of the exception

Returns
string HTML code

Definition at line 376 of file vendor/pear/pear_exception/PEAR/Exception.php.

References $cause, getCauseMessage(), and getTraceSafe().

Referenced by __toString().

toText ( )

Generates text representation of the exception and stack trace

Returns
string

Definition at line 443 of file vendor/pear/pear_exception/PEAR/Exception.php.

References $cause, and getCauseMessage().

Referenced by __toString().

Member Data Documentation

$_observers = array()
staticprivate
$_trace
private

Definition at line 103 of file vendor/pear/pear_exception/PEAR/Exception.php.

Referenced by getTraceSafe().

$_uniqueid = 0
staticprivate
$cause
protected
const OBSERVER_DIE = -8
const OBSERVER_PRINT = -2
const OBSERVER_TRIGGER = -4