Webmozart\Console\Api\IO\Input::setInteractive PHP Method

setInteractive() public method

Enables or disables interaction with the user.
public setInteractive ( boolean $interactive )
$interactive boolean Whether the inputmay interact with the user. If set to `false`, all calls to {@link read()} and {@link readLine()} will immediately return the default value.
    public function setInteractive($interactive)
    {
        $this->interactive = (bool) $interactive;
    }

Usage Example

Exemplo n.º 1
0
 public function testIsInteractive()
 {
     $this->assertTrue($this->input->isInteractive());
     $this->input->setInteractive(false);
     $this->assertFalse($this->input->isInteractive());
     $this->input->setInteractive(true);
     $this->assertTrue($this->input->isInteractive());
 }
All Usage Examples Of Webmozart\Console\Api\IO\Input::setInteractive