PHP Manual

PEAR Manual

Smarty Manual

PostgreSQL

MySQL Manual

Perl Manual

pear_errorstack::singleton()

pear_errorstack::singleton() -- return a single error stack for this package.

synopsis

require_once 'pear/errorstack.php';

pear_errorstack & pear_errorstack::singleton (string $package [, callback $msgcallback = false [, callback $contextcallback = false [, boolean $throwpear_error = false, string [$stackclass = 'pear_errorstack']]]])

backwards compatibility warning

warning

as of pear 1.3.2, pear_errorstack no longer instantiates and returns an exception object in php5, and the second-to-last parameter has been removed. code that relies upon this behavior will break.

description

note that all parameters are ignored if the stack for package $package has already been instantiated

parameter

string $package

name of the package this error stack represents

callback $msgcallback

callback used for error message generation

callback $contextcallback

callback used for context generation, defaults to getfileline()

boolean $throwpear_error

if true, then pear::raiseerror() will be called and a pear_error object will be returned from calls to pear_errorstack::push()

string $stackclass

class to instantiate

throws

no exceptions thrown.

note

this function should be called statically.