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.
Esempio 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());
 }
Esempio n. 2
0
 /**
  * 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);
 }