예제 #1
0
 /**
  * Echoes the debug backtrace
  *
  * @author Art <*****@*****.**>
  *
  * @param array $trace The backtrace
  */
 protected static function echoTrace($trace)
 {
     echo '<table class="table" border="1">' . '<thead>' . '<tr>' . '<th>#</th>' . '<th>Method</th>' . '<th>Args</th>' . '<th>Location</th>' . '<th>Line</th>' . '</tr>' . '</thead>' . '<tbody>';
     //BEGIN table
     foreach ($trace as $k => $v) {
         $func = $loc = $line = '';
         if (isset($v['class'])) {
             $func = $v['class'];
         }
         if (isset($v['type'])) {
             $func .= $v['type'];
         }
         if (isset($v['function'])) {
             $func .= $v['function'] . '()';
         }
         if (!$func) {
             $func = '[unknown]';
         }
         if (isset($v['file'])) {
             $loc = get(explode(DIR_INDEX, $v['file'])[1]);
         }
         if (isset($v['line'])) {
             $line .= $v['line'];
         }
         echo '<tr>' . '<td>' . $k . '</td>' . '<td>' . $func . '</td>' . '<td>' . (get($v['args']) ? debugLite($v['args']) : '<span class="label label-default">NONE</span>') . '</td>' . '<td>' . ($loc ? $loc : '<span class="label label-default">???</span>') . '</td>' . '<td>' . ($line || $line == '0' ? $line : '<span class="label label-default">???</span>') . '</td>' . '</tr>';
     }
     echo '</tbody>' . '</table>';
 }
예제 #2
0
 /**
  * Returns a string representation of the object data
  *
  * @author Art <*****@*****.**>
  * @return string
  */
 function __toString()
 {
     return \debugLite($this);
 }
예제 #3
0
 /**
  * Returns a string representation of the object data
  *
  * @author Art <*****@*****.**>
  * @return string
  */
 function __toString()
 {
     return strip_tags(\debugLite($this));
 }