| author | Bashkim Isai |
|---|---|
| package | Exception |
In file D:\oblib-core\php\oblib\dataException\dataExceptionTrace.class.php between lines 51 and 113.
<?php
/**
* Stores a debug_backtrace array entry so that it can be converted to an XML
* document and styled by XSL
*
* @author Bashkim Isai
* @package Exception
* @see Class [Exception]
* @see Class [dataObject]
*/
class dataExceptionTrace extends dataObject
{
/**
* Store the backtrace entry
*
* @see Class [dataException]
* @see Class [Exception]
* @return Void
*/
function __construct ($arrTrace)
{
parent::__construct ('ExceptionTrace');
$this->___Push (new dataString ('Path'));
$this->___Push (new dataString ('File'));
$this->___Push (new dataString ('Line'));
$this->___Push (new dataString ('Function'));
$this->___Push (new dataString ('Class'));
$this->___Push (new dataString ('Type'));
$this->___Push (new dataSeries ('ExceptionTraceParams', 'dataExceptionTraceParam'));
if (isset ($arrTrace ['file'])) $this->Path = dirname ($arrTrace ['file']);
if (isset ($arrTrace ['file'])) $this->File = basename ($arrTrace ['file']);
if (isset ($arrTrace ['line'])) $this->Line = $arrTrace ['line'];
if (isset ($arrTrace ['function'])) $this->Function = $arrTrace ['function'];
if (isset ($arrTrace ['class'])) $this->Class = $arrTrace ['class'];
if (isset ($arrTrace ['type'])) $this->Type = $arrTrace ['type'];
// If one of the lines were called by 'call_user_func_array',
// don't display the name of that function, but instead show
// the class that is being called and the location in which the
// call will end up with its params
switch ($arrTrace ['function'])
{
case 'call_user_func_array':
$this->Function = $arrTrace ['args'] [0];
$this->Class = get_class ($arrTrace ['args'] [1]);
$this->Type = '~>';
if (isset ($arrTrace ['args'] [2]))
{
$arrTrace ['args'] = $arrTrace ['args'] [2];
}
else
{
$arrTrace ['args'] = NULL;
}
break;
}
if (isset ($arrTrace ['args']))
{
foreach ($arrTrace ['args'] as $mixArg)
{
$this->ExceptionTraceParams->___Push (new dataExceptionTraceParam ($mixArg));
}
}
}
}
?>