Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
Error Class Reference

Abstract class for the management of system errors, errors due to wrong actions of the user, warning messages. More...

Static Public Member Functions

static codeMessages ()
 List of system default errors coded by int keys.
static errorMessage ($message, $link)
 Saves the error in the active session and redirect to the given url (where the error will be shown)
static getErrorMessage ()
 Gets the error message from the active session.
static syserrorMessage ($class, $function, $message, $line, $noDebugMsg=null)
 Management of system errors.
static warningMessage ($message, $link)
 Saves the warning in the active session and redirect to the given url (where the warning will be shown)

Detailed Description

Abstract class for the management of system errors, errors due to wrong actions of the user, warning messages.

System errors are displayed as independent pages, and the information shown depends on the value of the DEBUG setting in the configuration file.

Errors and warnings are stored in a session variable and shown after url redirecting.

Author:
abidibo abidi.nosp@m.bo@g.nosp@m.mail..nosp@m.com
Version:
0.99
Date:
2011-2012

Definition at line 32 of file error.class.php.


Member Function Documentation

static Error::codeMessages ( ) [static]

List of system default errors coded by int keys.

Returns:
array dictionary of default errors

Definition at line 40 of file error.class.php.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Error::errorMessage ( message,
link 
) [static]

Saves the error in the active session and redirect to the given url (where the error will be shown)

Parameters:
mixed$messagethe error message. Possible values are:
  • integer: the message is taken from the default errors dictionary
  • associative array in the form array('error'=>'error_message', 'hint'=>'error_hint')
mixed$linkthe redirection url
Returns:
redirects to the given url

Definition at line 110 of file error.class.php.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Error::getErrorMessage ( ) [static]

Gets the error message from the active session.

Returns:
the error message

Definition at line 162 of file error.class.php.

+ Here is the caller graph for this function:

static Error::syserrorMessage ( class,
function,
message,
line,
noDebugMsg = null 
) [static]

Management of system errors.

If the DEBUG setting in the configuration.php is set to true displays the error with all the information, otherwise displays a custom message.

Parameters:
string$classthe class which triggers the error
string$functionthe function which triggers the error
string$messagethe error message
int$linethe line number where the error occurs
string$noDebugMsgthe message to show if DEBUG mode is disabled
Returns:
prints the system error

Definition at line 61 of file error.class.php.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Error::warningMessage ( message,
link 
) [static]

Saves the warning in the active session and redirect to the given url (where the warning will be shown)

Parameters:
mixed$messageassociative array in the form array('warning'=>'warning_message', 'hint'=>'warning_hint')
mixed$linkthe redirection url
Returns:
redirects to the given url

Definition at line 138 of file error.class.php.

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: