public function setInput($input)
    {
        if ($this->linebuffer === $input) {
            return $this;
        }

        // remember old input length if echo replacement is used
        $oldlen = (is_string($this->echo)) ? $this->strlen($this->linebuffer) : null;

        $this->linebuffer = $input;
        $this->linepos = $this->strlen($this->linebuffer);

        // only redraw if input should be echo'ed (i.e. is not hidden anyway)
        // and echo replacement is used, make sure the input length changes
        if ($this->echo !== false && $this->linepos !== $oldlen) {
            $this->redraw();
        }

        return $this;
    }
public function setInput($input)
    {
        if ($this->linebuffer === $input) {
            return $this;
        }

        // remember old input length if echo replacement is used
        $oldlen = (is_string($this->echo)) ? $this->strlen($this->linebuffer) : null;

        $this->linebuffer = $input;
        $this->linepos = $this->strlen($this->linebuffer);

        // only redraw if input should be echo'ed (i.e. is not hidden anyway)
        // and echo replacement is used, make sure the input length changes
        if ($this->echo !== false && $this->linepos !== $oldlen) {
            $this->redraw();
        }

        return $this;
    }
public function setInput ( $ input ) { if ( $ this -> linebuffer === $ input ) { return $ this ; } // remember old input length if echo replacement is used $ oldlen = ( is_string ( $ this -> echo ) ) ? $ this -> strlen ( $ this -> linebuffer ) : null ; $ this -> linebuffer = $ input ; $ this -> linepos = $ this -> strlen ( $ this -> linebuffer ) ; // only redraw if input should be echo'ed (i.e. is not hidden anyway) // and echo replacement is used, make sure the input length changes if ( $ this -> echo !== false && $ this -> linepos !== $ oldlen ) { $ this -> redraw ( ) ; } return $ this ; }
set current text input buffer

this moves the cursor to the end of the current
input buffer (if any).

@param string $input
@return self
@uses self::redraw()
set current text input buffer