-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
<?php | ||
/** | ||
* Stand-alone, general-purpose error handler | ||
* | ||
* @package PHPDebugConsole | ||
* @author Brad Kent <[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
* @version v1.2 | ||
*/ | ||
|
||
namespace bdk\Debug; | ||
|
||
|
@@ -16,7 +24,10 @@ | |
} | ||
|
||
/** | ||
* Error handling methods | ||
* Stand-Alone general-purpose error handler class that supports fatal errors | ||
* | ||
* Able to register multiple onError "callback" functions | ||
* Can email an error report on error and throttles said email so does not excessively send email | ||
*/ | ||
class ErrorHandler | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
<?php | ||
/** | ||
* Output log as html or to FirePHP | ||
* | ||
* @package PHPDebugConsole | ||
* @author Brad Kent <[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
* @version v1.2 | ||
*/ | ||
|
||
namespace bdk\Debug; | ||
|
||
|
@@ -23,8 +31,8 @@ public function __construct($cfg = array(), &$data = array()) | |
$this->debug = Debug::getInstance(); | ||
$this->cfg = array( | ||
'css' => '', // additional "override" css | ||
'filepathCss' => dirname(__FILE__).'/Debug.css', | ||
'filepathScript' => dirname(__FILE__).'/Debug.jquery.min.js', | ||
'filepathCss' => dirname(__FILE__).'/css/Debug.css', | ||
'filepathScript' => dirname(__FILE__).'/js/Debug.jquery.min.js', | ||
'firephpInc' => dirname(__FILE__).'/FirePHP.class.php', | ||
'firephpOptions' => array( | ||
'useNativeJsonEncode' => true, | ||
|
@@ -452,7 +460,9 @@ protected function outputHtml() | |
} | ||
$lastError = $this->debug->errorHandler->get('lastError'); | ||
if ($lastError && $lastError['category'] === 'fatal') { | ||
foreach (array('type','category','hash','firstOccur','suppressed','inConsole','stats','vars') as $k) { | ||
$keysKeep = array('typeStr','message','file','line'); | ||
$keysRemove = array_diff(array_keys($lastError), $keysKeep); | ||
foreach ($keysRemove as $k) { | ||
unset($lastError[$k]); | ||
} | ||
array_unshift($this->data['log'], array('error error-fatal',$lastError)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
<?php | ||
/** | ||
* General-purpose utilities | ||
* | ||
* @package PHPDebugConsole | ||
* @author Brad Kent <[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
* @version v1.2 | ||
*/ | ||
|
||
namespace bdk\Debug; | ||
|
||
|
@@ -197,7 +205,7 @@ public function isRecursive($mixed, $key = null) | |
* @return mixed false, or path to reference | ||
* @internal | ||
*/ | ||
public function isRecursiveIteration(&$array, $unique = null, $path = array()) | ||
protected function isRecursiveIteration(&$array, $unique = null, $path = array()) | ||
{ | ||
if ($unique === null) { | ||
$unique = new \stdclass(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
<?php | ||
/** | ||
* Methods used to display and format values | ||
* | ||
* @package PHPDebugConsole | ||
* @author Brad Kent <[email protected]> | ||
* @license http://opensource.org/licenses/MIT MIT | ||
* @version v1.2 | ||
*/ | ||
|
||
namespace bdk\Debug; | ||
|
||
/** | ||
* VarDump: Methods concerning the display and formatting of values | ||
* VarDump: Methods used to display and format values | ||
*/ | ||
class VarDump | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters