Source for file Debug.php
Documentation is available at Debug.php
// {{{ class HTML_AJAX_Debug
* AJAX Debugging implementation
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @author David Coallier <davidc@php.net>
* @copyright 2005 David Coallier
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version Release: @package_version@
* This is the error message.
* The line where the error occured.
* The file where the error occured.
* The file to save the error to.
* @default ajaxErrLog.xml
var $file = 'ajaxErrLog.xml';
* @param string $errorMsg The error message.
* @param string $errLine The line where error occured.
* @param string $errCode The error Code.
* @param string $errFile The file where error occured.
$this->errorMsg = $errMsg;
$this->errorLine = $errLine;
$this->errorCode = $errCode;
$this->errorFile = $errFile;
$this->_timeOccured = date("Y-m-d H:i:s", time());
* This functions formats the error to xml format then we can save it.
* @return $this->error the main error.
$error = " <when>{$this->_timeOccured}</when> " . NEWLINE;
$error .= " <msg>{ $this->errorMsg}</msg> " . NEWLINE;
$error .= " <code>{ $this->errorCode}</code> " . NEWLINE;
$error .= " <line>{ $this->errorLine}</line> " . NEWLINE;
$error .= " <file>{ $this->errorFile}</file> " . NEWLINE . NEWLINE;
return $this->error = $error;
* This function pushes the array $_SESSION['html_ajax_debug']['time'][]
* with the values inside of $this->error
$_SESSION['html_ajax_debug']['time'][] = $this->error;
* This function saves the error to a file
* appending to this file.
if ($handle = fopen($this->file, 'a')) {
fwrite($handle, $this->error);
Documentation generated on Mon, 11 Mar 2019 14:11:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|