protected function drawRainbow()
    {
        $rainbow = $this->rainbow->next();
        $height = $this->rainbow->getHeight();
        $width = $this->rainbow->getWidth();

        $preamble = $this->getPreamble($height);
        $postamble = $this->getPostamble($height);

        while ($preamble-- > 0) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(str_repeat(' ', $width));
            $this->write("\n");
        }

        foreach ($rainbow as $line) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(implode($line));
            $this->write("\n");
        }

        while ($postamble-- > 0) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(str_repeat(' ', $width));
            $this->write("\n");
        }

        $this->resetCursor();

    }
protected function drawRainbow()
    {
        $rainbow = $this->rainbow->next();
        $height = $this->rainbow->getHeight();
        $width = $this->rainbow->getWidth();

        $preamble = $this->getPreamble($height);
        $postamble = $this->getPostamble($height);

        while ($preamble-- > 0) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(str_repeat(' ', $width));
            $this->write("\n");
        }

        foreach ($rainbow as $line) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(implode($line));
            $this->write("\n");
        }

        while ($postamble-- > 0) {
            $this->write(self::ESC . $this->width . 'C');
            $this->write(str_repeat(' ', $width));
            $this->write("\n");
        }

        $this->resetCursor();

    }
protected function drawRainbow ( ) { $ rainbow = $ this -> rainbow -> next ( ) ; $ height = $ this -> rainbow -> getHeight ( ) ; $ width = $ this -> rainbow -> getWidth ( ) ; $ preamble = $ this -> getPreamble ( $ height ) ; $ postamble = $ this -> getPostamble ( $ height ) ; while ( $ preamble -- > 0 ) { $ this -> write ( self :: ESC . $ this -> width . 'C' ) ; $ this -> write ( str_repeat ( ' ' , $ width ) ) ; $ this -> write ( "\n" ) ; } foreach ( $ rainbow as $ line ) { $ this -> write ( self :: ESC . $ this -> width . 'C' ) ; $ this -> write ( implode ( $ line ) ) ; $ this -> write ( "\n" ) ; } while ( $ postamble -- > 0 ) { $ this -> write ( self :: ESC . $ this -> width . 'C' ) ; $ this -> write ( str_repeat ( ' ' , $ width ) ) ; $ this -> write ( "\n" ) ; } $ this -> resetCursor ( ) ; }
Draws the rainbow for the current iteration.
Draws the rainbow for the current iteration .