Esempio n. 1
0
 /**
  * output:
  *
  * [value]
  *
  * value [title="[access] [name] [operator *] [subtype] [size] "]
  * OR
  * type [title="[access] [name] type [operator *] [subtype] [size] "]
  * <ul>extendedValue
  *
  * @param kintVariableData $kintVar
  *
  * @return string
  */
 public static function decorate(kintVariableData $kintVar)
 {
     if ($kintVar->extendedValue !== null || !empty($kintVar->alternatives)) {
         return Kint_Decorators_Rich::decorate($kintVar);
     }
     if ($kintVar->value !== null) {
         $output = '<span title="';
         if ($kintVar->access !== null) {
             $output .= $kintVar->access . " ";
         }
         if ($kintVar->name !== null) {
             $output .= $kintVar->name . " ";
         }
         if ($kintVar->type !== null) {
             $output .= $kintVar->type;
             if ($kintVar->subtype !== null) {
                 $output .= " " . $kintVar->subtype;
             }
             $output .= " ";
         }
         if ($kintVar->operator !== null) {
             $output .= $kintVar->operator . "";
         }
         if ($kintVar->size !== null) {
             $output .= "(" . $kintVar->size . ") ";
         }
         $output = trim($output) . '">' . $kintVar->value . '</span>';
     } else {
         $output = '<u>NULL</u>';
     }
     return $output;
 }
 protected static function _dump($var, $name = '')
 {
     kintParser::reset();
     return Kint_Decorators_Rich::decorate(kintParser::factory($var, $name));
 }
Esempio n. 3
0
 private static function _decorateCell(kintVariableData $kintVar)
 {
     if ($kintVar->extendedValue !== null || !empty($kintVar->_alternatives)) {
         return '<td>' . Kint_Decorators_Rich::decorate($kintVar) . '</td>';
     }
     $output = '<td';
     if ($kintVar->value !== null) {
         $output .= ' title="' . $kintVar->type;
         if ($kintVar->size !== null) {
             $output .= " (" . $kintVar->size . ")";
         }
         $output .= '">' . $kintVar->value;
     } else {
         $output .= '>';
         if ($kintVar->type !== 'NULL') {
             $output .= '<u>' . $kintVar->type;
             if ($kintVar->size !== null) {
                 $output .= "(" . $kintVar->size . ")";
             }
             $output .= '</u>';
         } else {
             $output .= '<u>NULL</u>';
         }
     }
     return $output . '</td>';
 }