public function cursorCommand(): void
    {
        $this->write('hello, this in ' . __METHOD__);
        $this->write('this is a message text.', false);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_BACKWARD, 6);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_FORWARD, 3);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_BACKWARD, 2);

        sleep(2);

        Terminal::make()->screen(Terminal::CLEAR_LINE, 3);

        $this->write('after 2s scroll down 3 row.');

        sleep(2);

        Terminal::make()->screen(Terminal::SCROLL_DOWN, 3);

        $this->write('after 3s clear screen.');

        sleep(3);

        Terminal::make()->screen(Terminal::CLEAR);
    }
public function cursorCommand(): void
    {
        $this->write('hello, this in ' . __METHOD__);
        $this->write('this is a message text.', false);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_BACKWARD, 6);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_FORWARD, 3);

        sleep(1);
        Terminal::make()->cursor(Terminal::CUR_BACKWARD, 2);

        sleep(2);

        Terminal::make()->screen(Terminal::CLEAR_LINE, 3);

        $this->write('after 2s scroll down 3 row.');

        sleep(2);

        Terminal::make()->screen(Terminal::SCROLL_DOWN, 3);

        $this->write('after 3s clear screen.');

        sleep(3);

        Terminal::make()->screen(Terminal::CLEAR);
    }
public function cursorCommand ( ) : void { $ this -> write ( 'hello, this in ' . __METHOD__ ) ; $ this -> write ( 'this is a message text.' , false ) ; sleep ( 1 ) ; Terminal :: make ( ) -> cursor ( Terminal :: CUR_BACKWARD , 6 ) ; sleep ( 1 ) ; Terminal :: make ( ) -> cursor ( Terminal :: CUR_FORWARD , 3 ) ; sleep ( 1 ) ; Terminal :: make ( ) -> cursor ( Terminal :: CUR_BACKWARD , 2 ) ; sleep ( 2 ) ; Terminal :: make ( ) -> screen ( Terminal :: CLEAR_LINE , 3 ) ; $ this -> write ( 'after 2s scroll down 3 row.' ) ; sleep ( 2 ) ; Terminal :: make ( ) -> screen ( Terminal :: SCROLL_DOWN , 3 ) ; $ this -> write ( 'after 3s clear screen.' ) ; sleep ( 3 ) ; Terminal :: make ( ) -> screen ( Terminal :: CLEAR ) ; }
This is a demo for show cursor move on the Terminal screen
This is a demo for show cursor move on the Terminal screen