You are here

private static function Kint_Decorators_Rich::_drawHeader in Devel 8.2

Same name and namespace in other branches
  1. 8 kint/kint/decorators/rich.php \Kint_Decorators_Rich::_drawHeader()
1 call to Kint_Decorators_Rich::_drawHeader()
Kint_Decorators_Rich::decorate in kint/kint/decorators/rich.php

File

kint/kint/decorators/rich.php, line 251

Class

Kint_Decorators_Rich

Code

private static function _drawHeader(kintVariableData $kintVar, $verbose = true) {
  $output = '';
  if ($verbose) {
    if ($kintVar->access !== null) {
      $output .= "<var>" . $kintVar->access . "</var> ";
    }
    if ($kintVar->name !== null && $kintVar->name !== '') {
      $output .= "<dfn>" . kintParser::escape($kintVar->name) . "</dfn> ";
    }
    if ($kintVar->operator !== null) {
      $output .= $kintVar->operator . " ";
    }
  }
  if ($kintVar->type !== null) {
    if ($verbose) {
      $output .= "<var>";
    }
    $output .= $kintVar->type;
    if ($verbose) {
      $output .= "</var>";
    }
    else {
      $output .= " ";
    }
  }
  if ($kintVar->size !== null) {
    $output .= "(" . $kintVar->size . ") ";
  }
  return $output;
}