Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/PEAR.php
PEAR Repository -

PEAR

PEAR

Base class for other PEAR classes. Provides rudimentary

 

private class PEAR

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: <code>$this->PEAR();</code>.
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 <code>error_log()</code>, <code>syslog()</code> or
something like that instead.

AuthorsStig Bakken <ssb@fast.no>
SincePHP 4.0.2

 
Direct known subclasses: Mail, Net_SMTP, Net_Socket, PEAR_Installer, XML_Parser

Public Method Summary

void

PEAR()

Constructor. Registers this object in
$_PEAR_destructor_object_list for destructor emulation.
void

_PEAR()

Destructor (the emulated type of...). Does nothing right now,
bool

isError( &$data)

Tell whether a value is a PEAR error.
void

PEAR_Error(string $message, integer $code, string $mode, string $options, string $debuginfo)

PEAR_Error constructor
int

getMode()

Get the error mode from an error object.
mixed

getCallback()

Get the callback function/method from an error object.
string

getMessage()

Get the error message from an error object.
int

getCode()

Get error code from an error object
string

getType()

Get the name of this error/exception.
string

getDebugInfo()

Get additional debug information supplied by the application.
string

toString()

Make a string representation of this object.

Private Method Summary

void

_PEAR_call_destructors()

Private Field Summary

boolean

$_debug

string

$error_message_prefix

string

$error_prepend

string

$error_append

string

$mode

string

$level

integer

$code

string

$message

string

$debuginfo

string

$file

integer

$line

Private Constant Summary

PEAR_ERROR_RETURN >>1<<
PEAR_ERROR_PRINT >>2<<
PEAR_ERROR_TRIGGER >>4<<
PEAR_ERROR_DIE >>8<<
PEAR_ERROR_CALLBACK >>16<<
PHP_BINDIR >>/usr/local/bin<<
PEAR_INSTALL_DIR >>/usr/local/lib/php<<
PEAR_EXTENSION_DIR >>/usr/local/lib/php/extensions/no-debug-non-zts-20001214<<

Public Method Details

PEAR

public void PEAR( )

  Constructor. Registers this object in
$_PEAR_destructor_object_list for destructor emulation.

Returns void


_PEAR

public void _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.

Returns void


isError

public bool isError( &$data )

  Tell whether a value is a PEAR error.

Parameter
&$data
Returns bool

true if $data is an error


PEAR_Error

public void PEAR_Error( string $message, integer $code, string $mode, string $options, string $debuginfo )

  PEAR_Error constructor

Parameter
string $message
integer $code
string $mode
string $options
string $debuginfo
Returns void


getMode

public int getMode( )

  Get the error mode from an error object.

Returns int

error mode


getCallback

public mixed getCallback( )

  Get the callback function/method from an error object.

Returns mixed

callback function or object/method array


getMessage

public string getMessage( )

  Get the error message from an error object.

Returns string

full error message


getCode

public int getCode( )

  Get error code from an error object

Returns int

error code


getType

public string getType( )

  Get the name of this error/exception.

Returns string

error/exception name (type)


getDebugInfo

public string getDebugInfo( )

  Get additional debug information supplied by the application.

Returns string

debug information


toString

public string toString( )

  Make a string representation of this object.

Returns string

a string with an object summary


Private Method Details

_PEAR_call_destructors

private void _PEAR_call_destructors( )

 

Returns void


Private Field Details

$_debug

private boolean $_debug

>>false<<


$error_message_prefix

private string $error_message_prefix

>>''<<


$error_prepend

private string $error_prepend

>>''<<


$error_append

private string $error_append

>>''<<


$mode

private string $mode

>>PEAR_ERROR_RETURN<<


$level

private string $level

>>E_USER_NOTICE<<


$code

private integer $code

>>-1<<


$message

private string $message

>>''<<


$debuginfo

private string $debuginfo

>>''<<


$file

private string $file

>>''<<


$line

private integer $line

>><<


Private Constant Details

PEAR_ERROR_RETURN

define( PEAR_ERROR_RETURN, >>1<< )
Case: default: case sensitive

PEAR_ERROR_PRINT

define( PEAR_ERROR_PRINT, >>2<< )
Case: default: case sensitive

PEAR_ERROR_TRIGGER

define( PEAR_ERROR_TRIGGER, >>4<< )
Case: default: case sensitive

PEAR_ERROR_DIE

define( PEAR_ERROR_DIE, >>8<< )
Case: default: case sensitive

PEAR_ERROR_CALLBACK

define( PEAR_ERROR_CALLBACK, >>16<< )
Case: default: case sensitive

PHP_BINDIR

define( PHP_BINDIR, >>/usr/local/bin<< )
Case: default: case sensitive

PEAR_INSTALL_DIR

define( PEAR_INSTALL_DIR, >>/usr/local/lib/php<< )
Case: default: case sensitive

PEAR_EXTENSION_DIR

define( PEAR_EXTENSION_DIR, >>/usr/local/lib/php/extensions/no-debug-non-zts-20001214<< )
Case: default: case sensitive


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta