for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PhpSchool\CliMenu\Dialogue;
use PhpSchool\Terminal\NonCanonicalReader;
/**
* @author Aydin Hassan <[email protected]>
*/
class Flash extends Dialogue
{
* Flash a message on top of the menu which
* disappears on any keystroke.
public function display() : void
$this->assertMenuOpen();
$this->terminal->moveCursorToRow($this->y);
$this->emptyRow();
$this->write(sprintf(
"%s%s%s%s%s\n",
$this->style->getUnselectedSetCode(),
str_repeat(' ', $this->style->getPadding()),
$this->text,
$this->style->getUnselectedUnsetCode()
));
$this->terminal->moveCursorToTop();
$reader = new NonCanonicalReader($this->terminal);
$reader->readCharacter();
$this->parentMenu->redraw();
}