public function _bindK() { if ($this->columnOffset == $this->table->getNumberOfColumns() - 1) { Cursor::bip(); } else { $this->columnOffset++; $this->renderInternal(); } return Readline::STATE_NO_ECHO; }
/** * Readline core. * * @param string $char Char. * @return string */ public function _readLine($char) { if (isset($this->_mapping[$char]) && is_callable($this->_mapping[$char])) { $mapping = $this->_mapping[$char]; return $mapping($this); } if (isset($this->_mapping[$char])) { $this->_buffer = $this->_mapping[$char]; } elseif (false === Ustring::isCharPrintable($char)) { Console\Cursor::bip(); return static::STATE_CONTINUE | static::STATE_NO_ECHO; } if ($this->getLineLength() == $this->getLineCurrent()) { $this->appendLine($this->_buffer); return static::STATE_CONTINUE; } $this->insertLine($this->_buffer); $tail = mb_substr($this->getLine(), $this->getLineCurrent() - 1); $this->_buffer = "[K" . $tail . str_repeat("[D", mb_strlen($tail) - 1); return static::STATE_CONTINUE; }