src/Readline.php
public function question($query, callable $callback)
    {
        if (!is_callable($callback)) { return $this; }

        if ($this->questionCallback) {
            $this->prompt();
        } else {
            $this->oldPrompt = $this->prompt;
            $this->setPrompt($query);
            $this->questionCallback = $callback;
            $this->prompt();
        }

        return $this;
    }
public function question($query, callable $callback)
    {
        if (!is_callable($callback)) { return $this; }

        if ($this->questionCallback) {
            $this->prompt();
        } else {
            $this->oldPrompt = $this->prompt;
            $this->setPrompt($query);
            $this->questionCallback = $callback;
            $this->prompt();
        }

        return $this;
    }
public function question ( $ query , callable $ callback ) { if ( ! is_callable ( $ callback ) ) { return $ this ; } if ( $ this -> questionCallback ) { $ this -> prompt ( ) ; } else { $ this -> oldPrompt = $ this -> prompt ; $ this -> setPrompt ( $ query ) ; $ this -> questionCallback = $ callback ; $ this -> prompt ( ) ; } return $ this ; }
Prompts for input.

@param string $query
@param callable $callback
@return $this
Prompts for input .