Gumbo_Log
Log Class
The Log class receives all Log_Message objects from the program. The Message must be an active type (or ignore types on). When the program is ready, simply call the 'write' method to save all the Message into a file. Once written, the messages are removed.
The class implements the Lockable Interface. This lock only applies to Message Types. Once set, it cannot be unlocked from outside the class. This helps to ensure that additional Log Types are not added in other locations of the program.
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 50]
bool $_ignore = false [line 60]
bool $_locked = false [line 63]
Gumbo_Log_Message[] $_messages = array () [line 53]
bool $_status = false [line 55]
array $_types = array () [line 58]
Class Methods
public void add ( Gumbo_Log_Message $mess )
[line 124]
Adds a log message to the list
Parameter(s):
- (Gumbo_Interface_Log_Message) $mess
- precondition:
isOn() Implementation of:
[ Top ]public void addType ( string $type ) [line 167]Adds an active Log Message Type
Parameter(s):
- (string) $type
- precondition:
Type is not set - precondition:
!isLocked() Implementation of:
[ Top ]public void delType ( string $type ) [line 193]Removes an active Log Message Type
Parameter(s):
- (string) $type
- precondition:
Type set - precondition:
!isLocked() Implementation of:
[ Top ]public array getTypes ( ) [line 261]Returns all the registered message types
Implementation of:
[ Top ]public bool ignoreTypes ( [bool $ignore] ) [line 307]Returns if to ignore Types (or set to ignore Types)
Parameter(s):
- (bool) $ignore
- precondition:
!isLocked() - throws:
Gumbo_Exception Implementation of:
[ Top ]public bool isType ( string $type ) [line 279]Returns if the message type is registered
Parameter(s):
- (string) $type
- throws:
Gumbo_Exception Implementation of:
[ Top ]isLocked()
[ Top ]Gumbo_Exception - postcondition:
!getTypes() - precondition:
!isLocked() Implementation of:
[ Top ]!isOn() Implementation of:
[ Top ]isOn() Implementation of:
[ Top ]isOn() - throws:
Gumbo_Exception Implementation of:
[ Top ]