private int
$maxHeight = 0;
/**
* @param resource $stream
* @param ConsoleSectionOutput[] $sections
*/
public function __construct($stream, array &
$sections, int
$verbosity, bool
$decorated, OutputFormatterInterface
$formatter) { parent::
__construct($stream,
$verbosity,
$decorated,
$formatter);
array_unshift($sections,
$this);
$this->sections = &
$sections;
$this->terminal =
new Terminal();
} /**
* Defines a maximum number of lines for this section.
*
* When more lines are added, the section will automatically scroll to the
* end (i.e. remove the first lines to comply with the max height).
*/
public function setMaxHeight(int
$maxHeight): void
{ // when changing max height, clear output of current section and redraw again with the new height