Class Debug
Provides custom debugging functions.
This class can send emails, log to a database, or display on screen debug information. You can set the enabled flags to enable the debug functions or set them to false to quiet them down. This way you can leave them as a part of your code with little overhead. For email and database logging, don't forget to setup the public properties.
Usage
// Turn debugging to screen on Debug::$enable_show = true; Debug::out("This will goto the screen because $enable_show == true"); // Turn off debugging to screen Debug::$enable_show = false;
Changelog
Version 1.9
- Updated private suffix (_) and documentation for consistency
Version 1.8
- Added namespacing
Version 1.7
- Added the date section to the documentation
License: http://opensource.org/licenses/MIT
Author: Jaime A. Rodriguez hi.i.am.jaime@gmail.com
Version: 1.9
Date: July 18, 2016
Located at class.debug.php
private
|
|
private
|
|
public
|
|
private static
|
|
public
|
|
public
|
|
private
boolean
|
|
private static
boolean
|
|
private static
boolean
|
|
public static
|
|
public static
|
|
public static
boolean
|
private static
|
$_instance
The single instance is stored here. |
#
NULL
|
private static
PDO
|
$_dbPDO
PDO Database object |
|
public static
boolean
|
$enable_show
Enable output to screen |
#
false
|
public static
boolean
|
$enable_log
Enabled logging to a database |
#
false
|
public static
boolean
|
$enable_send
Enabled logging via email |
#
false
|
public static
string
|
$emailTo
Email address to send email to. |
|
public static
string
|
$emailCC
Email address cc send email to. |
|
public static
string
|
$emailBCC
Email address bcc send email to. |
|
public static
string
|
$emailFrom
Email address to send email from. |
|
public static
string
|
$emailSubject
The subject of the email. |
|
public static
string[]
|
$emailBuffer
The body of the email. |
|
public static
string
|
$dbHost
Database Host |
|
public static
string
|
$dbName
Database Name |
|
public static
string
|
$dbUser
Database User Name |
|
public static
string
|
$dbPass
Database Password |
|
public static
string
|
$dbTable
Database Table to use for logging |