コード例 #1
0
ファイル: concise.php プロジェクト: AlexanderDolgan/ojahuri
 /**
  * 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;
 }
コード例 #2
0
ファイル: parser.class.php プロジェクト: alorel/alo-framework
 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>';
 }
コード例 #3
0
 protected static function _dump($var, $name = '')
 {
     kintParser::reset();
     return Kint_Decorators_Rich::decorate(kintParser::factory($var, $name));
 }
コード例 #4
0
 /**
  * produces css and js required for display. May be called multiple times, will only produce output once per
  * pageload or until `-` or `@` modifier is used
  *
  * @return string
  */
 protected static function _css()
 {
     if (!self::$_firstRun) {
         return '';
     }
     self::$_firstRun = false;
     $baseDir = KINT_DIR . 'view/inc/';
     if (!is_readable($cssFile = $baseDir . self::$theme . '.css')) {
         $cssFile = $baseDir . 'original.css';
     }
     return '<script>' . file_get_contents($baseDir . 'kint.js') . '</script>' . '<style>' . file_get_contents($cssFile) . "</style>\n";
 }