コード例 #1
0
 public function bindArrowUp(Readline $self)
 {
     $self->clearTerminalLine();
     $prefix = $self->getPrefix();
     $buffer = $self->previousHistory();
     $self->setBuffer("\r" . $prefix . $buffer);
     $self->setLine($buffer);
     return $self::READ_CONTINUE;
 }
コード例 #2
0
ファイル: Readline.php プロジェクト: alexpw/Console
 /**
  * Up arrow binding.
  * Go backward in the history.
  *
  * @access  public
  * @param   \Hoa\Console\Readline  $self    Self.
  * @return  int
  */
 public function _bindArrowUp(Readline $self)
 {
     if (0 === (static::STATE_CONTINUE & static::STATE_NO_ECHO)) {
         \Hoa\Console\Cursor::clear('↔');
         echo $self->getPrefix();
     }
     $self->setBuffer($buffer = $self->previousHistory());
     $self->setLine($buffer);
     return static::STATE_CONTINUE;
 }