예제 #1
0
파일: Rich.php 프로젝트: jnvsor/kint
 public static function renderHeader(Kint_Object $o)
 {
     $output = '';
     if (($s = $o->getModifiers()) !== null) {
         $output .= '<var>' . $s . '</var> ';
     }
     if (($s = $o->getName()) !== null) {
         $output .= '<dfn>' . Kint_Object_Blob::escape($s) . '</dfn> ';
         if ($s = $o->getOperator()) {
             $output .= Kint_Object_Blob::escape($s) . ' ';
         }
     }
     if (($s = $o->getType()) !== null) {
         $output .= '<var>' . Kint_Object_Blob::escape($s) . '</var>';
     }
     if (($s = $o->getSize()) !== null) {
         $output .= '(' . $s . ') ';
     }
     if (($s = $o->getValueShort()) !== null) {
         $s = preg_replace('/\\s+/', ' ', $s);
         if (Kint::$max_str_length && Kint_Object_Blob::strlen($s) > Kint::$max_str_length) {
             $s = substr($s, 0, Kint::$max_str_length) . '...';
         }
         $output .= Kint_Object_Blob::escape($s);
     }
     return $output;
 }
예제 #2
0
파일: Plugin.php 프로젝트: jnvsor/kint
 public static function renderLockedHeader(Kint_Object $o, $content)
 {
     $header = '<dt class="kint-parent kint-locked">';
     if ($o->depth > 0 && ($ap = $o->getAccessPath())) {
         $header .= '<span class="kint-access-path-trigger" title="Show access path">&rlarr;</span>';
     }
     $header .= '<span class="kint-popup-trigger" title="Open in new window">&rarr;</span><nav></nav>';
     if (($s = $o->getModifiers()) !== null) {
         $header .= '<var>' . $s . '</var> ';
     }
     if (($s = $o->getName()) !== null) {
         $header .= '<dfn>' . Kint_Object_Blob::escape($s) . '</dfn> ';
         if ($s = $o->getOperator()) {
             $header .= Kint_Object_Blob::escape($s) . ' ';
         }
     }
     if (($s = $o->getType()) !== null) {
         $header .= '<var>' . Kint_Object_Blob::escape($s) . '</var>';
     }
     if (($s = $o->getSize()) !== null) {
         $header .= '(' . $s . ') ';
     }
     $header .= $content;
     if (!empty($ap)) {
         $header .= '<div class="access-path">' . Kint_Object_Blob::escape($ap) . '</div>';
     }
     return $header . '</dt>';
 }
예제 #3
0
파일: Trace.php 프로젝트: jnvsor/kint
 public function getSize()
 {
     if (!$this->size) {
         return 'empty';
     }
     return parent::getSize();
 }