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 testIsInteractive() { $this->assertTrue($this->input->isInteractive()); $this->input->setInteractive(false); $this->assertFalse($this->input->isInteractive()); $this->input->setInteractive(true); $this->assertTrue($this->input->isInteractive()); }
/** * Enables or disables interaction with the user. * * @param bool $interactive Whether the I/O may 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->input->setInteractive($interactive); }