You are here

private function VarDumperConsole::border in VarDumper 7

Same name and namespace in other branches
  1. 8 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 32
Contains Drupal\vardumper_console\VarDumper\VarDumperConsole.

Class

VarDumperConsole
The VarDumperConsole class.

Namespace

Drupal\vardumper_console\VarDumper

Code

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