Gumbo_Debug



Debug 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 40]
bool $_active =  false [line 43]
array $_classes = array () [line 55]
array $_files = array () [line 57]
array $_functions = array () [line 53]
bool $_inclusive =  true [line 51]
array $_list = array () [line 45]
num $_time [line 48]

Class Methods

public static Gumbo_Interface_Debug instance ( ) [line 72]

Singleton Pattern Method


[ Top ]
private Gumbo_Debug __construct ( ) [line 64]

Constructor, for Singleton Pattern


[ Top ]
public void activate ( ) [line 234]

Activates the Debugger

  • postcondition:  $_active = true
Implementation of:
Gumbo_Interface_Debug::activate()

[ Top ]
public void add ( string $mess, string $file, int $line, [string $func], [string $cls] ) [line 90]

Creates a message and adds it to the Debugger

Parameter(s):

  • (string) $mess :: message content
  • (string) $file :: file name
  • (int) $line :: line number
  • (string) $func :: function/method name
  • (string) $cls :: class name
Implementation of:
Gumbo_Interface_Debug::add()

[ Top ]
public void addRestrictedClass ( string $cls ) [line 145]

Adds a class to the restriction list

Parameter(s):

  • (string) $cls :: class name
  • throws:  Gumbo_Exception
  • precondition:  is_class ($cls)
  • precondition:  !isRestrictedClass ($cls)
Implementation of:
Gumbo_Interface_Debug::addRestrictedClass()

[ Top ]
public void addRestrictedFile ( string $file, [int $start], [int $end] ) [line 175]

Adds a file to the restriction list

Parameter(s):

  • (string) $file :: file name
  • (int) $start :: start line
  • (int) $end :: end line
  • throws:  Gumbo_Exception
  • precondition:  !isRestrictedFile ($file, $start, $end)
  • precondition:  file_exists ($file)
  • precondition:  $start < $end
Implementation of:
Gumbo_Interface_Debug::addRestrictedFile()

[ Top ]
public void addRestrictedFunction ( string $func, [string $cls] ) [line 111]

Adds a function to the restriction list

Parameter(s):

  • (string) $func :: function name
  • (string) $cls :: class name
  • throws:  Gumbo_Exception
  • precondition:  function_exists ($func) or method_exists ($cls, $func)
  • precondition:  !isRestrictedFunction ($func, $cls)
Implementation of:
Gumbo_Interface_Debug::addRestrictedFunction()

[ Top ]
public void deactivate ( ) [line 242]

Deactivates the Debugger

  • postcondition:  $_active = false
Implementation of:
Gumbo_Interface_Debug::deactivate()

[ Top ]
public array getAllMessages ( ) [line 291]

Returns all the messages of the Debugger

Implementation of:
Gumbo_Interface_Debug::getAllMessages()

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

Returns an Iterator object

Implementation of:
IteratorAggregate::getIterator

[ Top ]
public num getTime ( ) [line 299]

Returns the time stamp when the Debugger was started

Implementation of:
Gumbo_Interface_Debug::getTime()

[ Top ]
public bool isActive ( ) [line 333]

Returns if the Debug mode is active

Implementation of:
Gumbo_Interface_Debug::isActive()

[ Top ]
public bool isInclusive ( ) [line 341]

Returns if the restrictions are inclusive

Implementation of:
Gumbo_Interface_Debug::isInclusive()

[ Top ]
public bool isRestrictedClass ( string $cls ) [line 386]

Returns if the class is restricted

Parameter(s):

  • (string) $cls :: class name
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Debug::isRestrictedClass()

[ Top ]
public bool isRestrictedFile ( string $file, [int $line] ) [line 413]

Returns if the file is restricted

Parameter(s):

  • (string) $file :: file name
  • (int) $line :: line number
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Debug::isRestrictedFile()

[ Top ]
public bool isRestrictedFunction ( string $func, [string $cls] ) [line 352]

Returns if the function is restricted

Parameter(s):

  • (string) $func :: function name
  • (string) $cls :: class name
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Debug::isRestrictedFunction()

[ Top ]
public void reset ( ) [line 223]

Resets the Debug messages

  • postcondition:  $_messages = array ()
  • postcondition:  setTime ()
Implementation of:
Gumbo_Interface_Debug::reset()

[ Top ]
public void resetRestrictions ( ) [line 212]

Resets all the restrictions

  • postcondition:  $_functions, $_classes, $_files = array ()
Implementation of:
Gumbo_Interface_Debug::resetRestrictions()

[ Top ]
public void setExclusive ( ) [line 280]

Sets the mode to Exclusive

  • postcondition:  $_inclusive = false
Implementation of:
Gumbo_Interface_Debug::setExclusive()

[ Top ]
public void setInclusive ( ) [line 272]

Set the mode to Inclusive

  • postcondition:  $_inclusive = true
Implementation of:
Gumbo_Interface_Debug::setInclusive()

[ Top ]
private array _getClasses ( ) [line 315]

Returns a list of restricted classes


[ Top ]
private array _getFiles ( ) [line 323]

Returns a list of restricted files


[ Top ]
private array _getFunctions ( ) [line 307]

Returns a list of restricted functions


[ Top ]
private void _setTime ( num $time ) [line 254]

Sets the time stamp when the debugger started

Parameter(s):

  • (num) $time
  • throws:  Gumbo_Exception

[ Top ]