public function addInput($input)
    {
        if ($input === '') {
            return $this;
        }

        // read everything up until before current position
        $pre  = $this->substr($this->linebuffer, 0, $this->linepos);
        $post = $this->substr($this->linebuffer, $this->linepos);

        $this->linebuffer = $pre . $input . $post;
        $this->linepos += $this->strlen($input);

        // only redraw if input should be echo'ed (i.e. is not hidden anyway)
        if ($this->echo !== false) {
            $this->redraw();
        }

        return $this;
    }
public function addInput($input)
    {
        if ($input === '') {
            return $this;
        }

        // read everything up until before current position
        $pre  = $this->substr($this->linebuffer, 0, $this->linepos);
        $post = $this->substr($this->linebuffer, $this->linepos);

        $this->linebuffer = $pre . $input . $post;
        $this->linepos += $this->strlen($input);

        // only redraw if input should be echo'ed (i.e. is not hidden anyway)
        if ($this->echo !== false) {
            $this->redraw();
        }

        return $this;
    }
public function addInput ( $ input ) { if ( $ input === '' ) { return $ this ; } // read everything up until before current position $ pre = $ this -> substr ( $ this -> linebuffer , 0 , $ this -> linepos ) ; $ post = $ this -> substr ( $ this -> linebuffer , $ this -> linepos ) ; $ this -> linebuffer = $ pre . $ input . $ post ; $ this -> linepos += $ this -> strlen ( $ input ) ; // only redraw if input should be echo'ed (i.e. is not hidden anyway) if ( $ this -> echo !== false ) { $ this -> redraw ( ) ; } return $ this ; }
Appends the given input to the current text input buffer at the current position

This moves the cursor accordingly to the number of characters added.

@param string $input
@return self
@uses self::redraw()
Appends the given input to the current text input buffer at the current position