lithium\console\Command::header()

public method

Writes a header to the output stream. In addition to the actual text, horizontal lines before and afterwards are written. The lines will have the same length as the text. This behavior can be modified by providing the length of lines as a second paramerter.

Given the text 'Lithium' this generates following output:

-------
Lithium
-------

Parameters

  • string $text

    The heading text.

  • integer $line

    The length of the line. Defaults to the length of text.

Returns

void

Source

	public function header($text, $line = null) {
		if (!$line) {
			$line = strlen($text);
		}
		$this->hr($line);
		$this->out($text, 'heading');
		$this->hr($line);
	}