You are here

private function VarDumperConsole::border in VarDumper 8

Same name and namespace in other branches
  1. 7 modules/vardumper_console/src/VarDumper/VarDumperConsole.php \Drupal\vardumper_console\VarDumper\VarDumperConsole::border()

Helper method to add a border around the header in console.

1 call to VarDumperConsole::border()
VarDumperConsole::dump in modules/vardumper_console/src/VarDumper/VarDumperConsole.php
.

File

modules/vardumper_console/src/VarDumper/VarDumperConsole.php, line 29

Class

VarDumperConsole
The VarDumperConsole class.

Namespace

Drupal\vardumper_console\VarDumper

Code

private function border($string, $character = '*') {
  $string = $character . ' ' . $string . ' ' . $character;
  $line = str_repeat($character, mb_strlen($string));
  return implode("\n", [
    $line,
    $string,
    $line,
  ]);
}