Source for file StackModel.php
Documentation is available at StackModel.php
* Stack trace list model.
* Is used as model for Gtk2_ExceptionDump_Stack class
* @package Gtk2_ExceptionDump
* @author Christian Weiske <cweiske@php.net>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link http://pear.php.net/package/Gtk2_ExceptionDump
* Creates the stack trace tree model.
* @param mixed $exception Exception or PEAR_Error
Gobject ::TYPE_LONG , Gobject ::TYPE_STRING ,
Gobject ::TYPE_STRING , Gobject ::TYPE_PHP_VALUE
if ($exception !== null ) {
}//public function __construct($exception = null)
* Sets and displays the exception.
* @param mixed $exception Exception or PEAR_Error
* @param int $nOmitLines Number of stack lines to supress
/* PEAR_Error->getBacktrace(): arrays with this elements:
string(61) "/data/php-gtk/two/Gtk2_ExceptionDump/pear_error.phpw"
/* Exception->getTrace(): array with elements a la:
string(60) "/data/php-gtk/two/Gtk2_ExceptionDump/examples/exception.phpw"
$func = $exception instanceof PEAR_Error ? 'getBacktrace' : 'getTrace';
$trace = $exception->$func();
foreach ($trace as $id => $step) {
if (!isset ($step['args']) || count($step['args']) == 0 ) {
$function = $step['function'] . '()';
$function = $step['function'] . '(...)';
if (isset ($step['class'])) {
if ($step['class'] == $step['function']) {
$function = 'new ' . $function;
$function = $step['class'] . $step['type'] . $function;
if (isset ($step['file'])) {
$file = basename($step['file']) . '#' . $step['line']
$parent = $this->append (null , array (
if (isset ($step['args'])) {
foreach ($step['args'] as $arg) {
$this->append ($parent, array (
}//public function setException($exception, $nOmitLines = 0)
}//class Gtk2_ExceptionDump_StackModel extends GtkTreeStore
Documentation generated on Mon, 11 Mar 2019 15:55:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|