Gumbo_Error



Error Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

static Gumbo_Interface_Singleton $_instance =  null [line 59]
array $_errors = array () [line 67]
bool $_exists =  false [line 69]
int $_ignore_level =  Gumbo_Error::DEBUG [line 74]
int $_level =  Gumbo_Error::OK [line 65]
array $_observers = array () [line 62]
int $_report_level =  Gumbo_Error::NOTICE [line 72]

Class Methods

public static Gumbo_Interface_Error instance ( ) [line 87]

Singleton Method


[ Top ]
public void add ( $e ) [line 145]

Adds an Exception to the list

Parameter(s):

  • (Exception) $e
Implementation of:
Gumbo_Interface_Error::add()

[ Top ]
private Gumbo_Error __construct ( ) [line 81]

Constructor


[ Top ]
public int attach ( $obj ) [line 102]

Attaches an Error_Observer to the object

Parameter(s):

  • return:  current error level

[ Top ]
public void clear ( [int $level] ) [line 176]

Clears all the errors from the system

Parameter(s):

  • (int) $level :: level to clear
  • postcondition:  exceptions thrown are cleared
  • postcondition:  level() = Gumbo_Error::OK
Implementation of:
Gumbo_Interface_Error::clear()

[ Top ]
public int count ( [int $level] ) [line 312]

Returns the number of errors

Parameter(s):

  • (int) $level :: number of errors at level
Implementation of:
Gumbo_Interface_Error::count()

[ Top ]
public void detach ( $obj ) [line 126]

Detach an Error_Observer from the object

Parameter(s):


[ Top ]
public bool exists ( [int $level] ) [line 270]

Returns if any Errors exist

Parameter(s):

  • (int) $level :: if errors of this level exist
Implementation of:
Gumbo_Interface_Error::exists()

[ Top ]
public Exception[] getAll ( [int $level], [bool $only] ) [line 232]

Returns all Errors

Parameter(s):

  • (int) $level :: limit to supplied level and above
  • (bool) $only :: limits to only errors at the supplied level
Implementation of:
Gumbo_Interface_Error::getAll()

[ Top ]
public int getIgnoreLevel ( ) [line 346]

Returns the minimum ignore level

Implementation of:
Gumbo_Interface_Error::getIgnoreLevel()

[ Top ]
public Iterator getIterator ( ) [line 355]

Returns an Iterator object

Implementation of:
IteratorAggregate::getIterator

[ Top ]
public int getReportLevel ( ) [line 338]

Returns the minimum reporting level

Implementation of:
Gumbo_Interface_Error::getReportLevel()

[ Top ]
public int level ( ) [line 303]

Returns the current error level value

The Error level will be a binary representation of the available error level constants. This will allow the system to determine the level of errors triggered during program execution.

Implementation of:
Gumbo_Interface_Error::level()

[ Top ]
public void notify ( ) [line 135]

Notifies the Error_Observers about changes to the system


[ Top ]
public void setIgnoreLevel ( int $level ) [line 217]

Sets the ignore level, which disregards any errors at or below this level

Parameter(s):

  • (int) $level
Implementation of:
Gumbo_Interface_Error::setIgnoreLevel()

[ Top ]
public void setReportLevel ( int $level ) [line 207]

Sets the minimum error reporting level

A value of 0 reports ALL errors

Parameter(s):

  • (int) $level
Implementation of:
Gumbo_Interface_Error::setReportLevel()

[ Top ]
private bool _validLevel ( int $level ) [line 379]

Returns if the given integer is a valid error level

Parameter(s):

  • (int) $level

[ Top ]

Class Constants

ALERT = [line 52]
ALL = [line 56]
CRITICAL = [line 50]
DEBUG = [line 42]
EMERGENCY = [line 54]
ERROR = [line 48]
NOTICE = [line 44]
OK = [line 40]
WARNING = [line 46]