setQuiet() public method

Sets whether all output should be suppressed.
public setQuiet ( boolean $quiet )
$quiet boolean Pass `true` to suppress all output and `false` otherwise.
Beispiel #1
0
 public function testGetVerbosityQuiet()
 {
     $input = new Input(new StringInputStream());
     $output = new Output(new BufferedOutputStream());
     $errorOutput = new Output(new BufferedOutputStream());
     $this->io = new IO($input, $output, $errorOutput);
     $this->output = new IOOutput($this->io);
     $this->io->setQuiet(true);
     $this->assertSame(OutputInterface::VERBOSITY_QUIET, $this->output->getVerbosity());
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function setVerbosity($level)
 {
     switch ($level) {
         case self::VERBOSITY_QUIET:
             $this->io->setQuiet(true);
             break;
         case self::VERBOSITY_NORMAL:
             $this->io->setQuiet(false);
             $this->io->setVerbosity(IO::NORMAL);
             break;
         case self::VERBOSITY_VERBOSE:
             $this->io->setQuiet(false);
             $this->io->setVerbosity(IO::VERBOSE);
             break;
         case self::VERBOSITY_VERY_VERBOSE:
             $this->io->setQuiet(false);
             $this->io->setVerbosity(IO::VERY_VERBOSE);
             break;
         case self::VERBOSITY_DEBUG:
             $this->io->setQuiet(false);
             $this->io->setVerbosity(IO::DEBUG);
             break;
     }
 }