public __construct ( integer $p_number, string $p_string, string $p_file, integer $p_line, string $p_software, integer $p_version, string $p_time = "", mixed $p_backtrace = "" ) | ||
$p_number | integer | The PHP error number. |
$p_string | string | The error message. |
$p_file | string | The file which encountered the error. |
$p_line | integer | The line number of the file which encountered the error. |
$p_software | string | The name of the software that encountered an error. |
$p_version | integer | The version of the software that encountered an error. |
$p_time | string | The date and time. If left blank, it is the current date and time. |
$p_backtrace | mixed | The stack trace. This can be an array or string. |
public function __construct($p_number, $p_string, $p_file, $p_line, $p_software, $p_version, $p_time = "", $p_backtrace = "")
{
$this->invalidParam = "Invalid parameter value.";
if (!is_string($p_software)) {
trigger_error($this->invalid_param);
}
if ($p_time == "") {
$p_time = date("r");
}
if ($p_backtrace == "" || $p_backtrace == array()) {
$backtrace = debug_backtrace();
// --- We don't need the first 2 lines from the debug_backtrace() ---
$newBacktrace = array();
for ($aa = 2; $aa < sizeof($backtrace); $aa++) {
$newBacktrace[] = $backtrace[$aa];
}
if (sizeof($newBacktrace) > 0) {
$backtrace = $newBacktrace;
}
} else {
$backtrace = $p_backtrace;
}
$this->m_software = $p_software;
$this->m_version = $p_version;
$this->m_num = (int) $p_number;
$this->m_str = $p_string;
$this->m_file = $p_file;
$this->m_line = (int) $p_line;
$this->m_backtrace = $this->__convertBacktraceArrayToString($backtrace);
$this->m_time = $p_time;
}