You are here

private static function Kint_Decorators_Plain::_char in Devel 8.2

Same name and namespace in other branches
  1. 8 kint/kint/decorators/plain.php \Kint_Decorators_Plain::_char()
3 calls to Kint_Decorators_Plain::_char()
Kint_Decorators_Plain::decorateTrace in kint/kint/decorators/plain.php
Kint_Decorators_Plain::wrapEnd in kint/kint/decorators/plain.php
Kint_Decorators_Plain::_title in kint/kint/decorators/plain.php

File

kint/kint/decorators/plain.php, line 204

Class

Kint_Decorators_Plain

Code

private static function _char($char, $repeat = null) {
  switch (Kint::enabled()) {
    case Kint::MODE_PLAIN:
      $char = self::$_htmlSymbols[array_search($char, self::$_utfSymbols, true)];
      break;
    case Kint::MODE_CLI:
      $inWindowsShell = PHP_SAPI === 'cli' && DIRECTORY_SEPARATOR !== '/';
      if ($inWindowsShell) {
        $char = self::$_winShellSymbols[array_search($char, self::$_utfSymbols, true)];
      }
      break;
    case Kint::MODE_WHITESPACE:
    default:
      break;
  }
  return $repeat ? str_repeat($char, $repeat) : $char;
}