setVerbosity() public method

Sets the verbosity level of the output.
public setVerbosity ( integer $verbosity )
$verbosity integer One of the constants {@link NORMAL}, {@link VERBOSE}, {@link VERY_VERBOSE} or {@link DEBUG}. Only output with the given verbosity level or smaller will be written out.
示例#1
0
 public function testWriteLineRawWhenDebug()
 {
     $this->output->setVerbosity(IO::DEBUG);
     $this->output->writeLineRaw('Lorem ipsum');
     $this->output->writeLineRaw('dolor sit amet', IO::VERBOSE);
     $this->output->writeLineRaw('consetetur', IO::VERY_VERBOSE);
     $this->output->writeLineRaw('sadipscing elitr', IO::DEBUG);
     $this->assertSame('Lorem ipsum' . PHP_EOL . 'dolor sit amet' . PHP_EOL . 'consetetur' . PHP_EOL . 'sadipscing elitr' . PHP_EOL, $this->stream->fetch());
 }
示例#2
0
文件: IO.php 项目: webmozart/console
 /**
  * Sets the verbosity of the output.
  *
  * @param int $verbosity One of the constants {@link NORMAL}, {@link VERBOSE},
  *                       {@link VERY_VERBOSE} or {@link DEBUG}. Only output
  *                       with the given verbosity level or smaller will be
  *                       passed through.
  */
 public function setVerbosity($verbosity)
 {
     $this->output->setVerbosity($verbosity);
     $this->errorOutput->setVerbosity($verbosity);
 }