Ejemplo n.º 1
0
 public function render($o)
 {
     $children = $this->renderer->renderChildren($o);
     if (!$o instanceof Kint_Object_Closure) {
         $header = Kint_Renderer_Rich::renderHeader($o);
     } else {
         $header = '';
         if (($s = $o->getModifiers()) !== null) {
             $header .= '<var>' . $s . '</var> ';
         }
         if (($s = $o->getName()) !== null) {
             $header .= '<dfn>' . Kint_Object_Blob::escape($s . '(' . $o->getParams() . ')') . '</dfn> ';
         }
         $header .= '<var>Closure</var>';
         $header .= Kint_Object_Blob::escape(Kint::shortenPath($o->filename)) . ':' . (int) $o->startline;
     }
     $header = Kint_Renderer_Rich::renderHeaderWrapper($o, (bool) strlen($children), $header);
     return '<dl>' . $header . $children . '</dl>';
 }
Ejemplo n.º 2
0
 public function render($o)
 {
     $children = $this->renderer->renderChildren($o);
     if (!$o instanceof Kint_Object_TraceFrame) {
         $header = Kint_Renderer_Rich::renderHeader($o);
     } else {
         if (!empty($o->trace['file']) && !empty($o->trace['line'])) {
             $header = '<var>' . Kint_Object_Blob::escape(Kint::shortenPath($o->trace['file'])) . ':' . (int) $o->trace['line'] . '</var> ';
         } else {
             $header = '<var>PHP internal call</var> ';
         }
         if ($o->trace['class']) {
             $header .= Kint_Object_Blob::escape($o->trace['class'] . $o->trace['type']);
         }
         if (is_string($o->trace['function'])) {
             $function = $o->trace['function'] . '()';
         } else {
             $function = $o->trace['function']->getName() . '(' . $o->trace['function']->getParams() . ')';
         }
         $header .= '<dfn>' . Kint_Object_Blob::escape($function) . '</dfn>';
     }
     $header = Kint_Renderer_Rich::renderHeaderWrapper($o, (bool) strlen($children), $header);
     return '<dl>' . $header . $children . '</dl>';
 }