Commit 6d44a52c by sn

backtrace modifikationen

1 parent 805e9c0c
Showing with 12 additions and 5 deletions
...@@ -413,10 +413,10 @@ class D { ...@@ -413,10 +413,10 @@ class D {
$objfncs = get_class_methods(get_class($param_Array)); $objfncs = get_class_methods(get_class($param_Array));
if(array_search('getData', $objfncs)) { if(array_search('getData', $objfncs)) {
$var_value2Array = $param_Array->getData(); $var_value2Array = $param_Array->getData();
$info_toArray = '(Obj->getData)'; $info_toArray = '(Obj['. get_class($param_Array).']->getData)';
} if(array_search('toArray', $objfncs)) { } if(array_search('toArray', $objfncs)) {
$var_value2Array = $param_Array->toArray(); $var_value2Array = $param_Array->toArray();
$info_toArray = '(Obj->toArray)'; $info_toArray = '(Obj['. get_class($param_Array).']->toArray)';
} else { } else {
$var_value2Array = $param_Array; $var_value2Array = $param_Array;
} }
...@@ -605,18 +605,25 @@ class D { ...@@ -605,18 +605,25 @@ class D {
} }
public static function backtrace($class=null, $param_print=true, $param_force=false) { public static function backtrace($class=null, $param_lastCalls=0, $param_print=true, $param_force=false) {
self::printCurrentFunction($param_print); self::printCurrentFunction($param_print);
//echo '<h1>backtrace('.$class.')</h1>'; //echo '<h1>backtrace('.$class.')</h1>';
self::new_echo('<h1>backtrace('.$class.')</h1>', $param_print, $param_force); self::new_echo('<h1>backtrace('.$class.')</h1>', $param_print, $param_force);
$array = debug_backtrace(); $array = debug_backtrace();
$k=0; $k=0;
$table_start = '<table border="1">' ; $table_start = '<table border="1" style="font-size:10px;">' ;
$table_start .= '<tr valign="top"><td align="right">Klasse</td><td>Funktion</td><td>Datei</td></tr>'; $table_start .= '<tr valign="top"><td align="right">Klasse</td><td>Funktion</td><td>Datei</td></tr>';
self::new_echo($table_start, $param_print, $param_force); self::new_echo($table_start, $param_print, $param_force);
for($i=count($array)-1; $i!=0; $i--) { if($param_lastCalls==0){
$maxCalls = count($array);
} else {
$maxCalls = $param_lastCalls+1;
}
for($i=$maxCalls-1; $i!=0; $i--) {
// for($i=count($array)-1; $i!=0; $i--) {
$k++; $k++;
$var_string = '<tr valign="top">'; $var_string = '<tr valign="top">';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!