public function clear($rightAway = false) {

        // clear the old settings
        $this->desiredState->clear();

        // if it desired to send out the clear sequence right away
        if ($rightAway) {

            // send it out
            $this->output(EscapeSequenceGenerator::generateClearSequence());

            // reset the two states to cleared
            $this->currentState = new TerminalState();
            $this->desiredState = new TerminalState();
        }


        // chaining
        return $this;
    }
public function clear($rightAway = false) {

        // clear the old settings
        $this->desiredState->clear();

        // if it desired to send out the clear sequence right away
        if ($rightAway) {

            // send it out
            $this->output(EscapeSequenceGenerator::generateClearSequence());

            // reset the two states to cleared
            $this->currentState = new TerminalState();
            $this->desiredState = new TerminalState();
        }


        // chaining
        return $this;
    }
public function clear ( $ rightAway = false ) { // clear the old settings $ this -> desiredState -> clear ( ) ; // if it desired to send out the clear sequence right away if ( $ rightAway ) { // send it out $ this -> output ( EscapeSequenceGenerator :: generateClearSequence ( ) ) ; // reset the two states to cleared $ this -> currentState = new TerminalState ( ) ; $ this -> desiredState = new TerminalState ( ) ; } // chaining return $ this ; }
Clear away all formatting - bold, underscore, text and fill color

@param boolean $rightAway - whether to send out the escape sequence right away
or allow the display to do it later
@return $this
Clear away all formatting - bold underscore text and fill color