You are here

class NullOutput in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Output/NullOutput.php \Symfony\Component\Console\Output\NullOutput

NullOutput suppresses all output.

$output = new NullOutput();

@author Fabien Potencier <fabien@symfony.com> @author Tobias Schultze <http://tobion.de>

Hierarchy

Expanded class hierarchy of NullOutput

5 files declare their use of NullOutput
ApplicationTest.php in vendor/symfony/console/Tests/ApplicationTest.php
CommandTest.php in vendor/symfony/console/Tests/Command/CommandTest.php
NullOutputTest.php in vendor/symfony/console/Tests/Output/NullOutputTest.php
ProgressHelper.php in vendor/symfony/console/Helper/ProgressHelper.php
TableHelper.php in vendor/symfony/console/Helper/TableHelper.php

File

vendor/symfony/console/Output/NullOutput.php, line 25

Namespace

Symfony\Component\Console\Output
View source
class NullOutput implements OutputInterface {

  /**
   * {@inheritdoc}
   */
  public function setFormatter(OutputFormatterInterface $formatter) {

    // do nothing
  }

  /**
   * {@inheritdoc}
   */
  public function getFormatter() {

    // to comply with the interface we must return a OutputFormatterInterface
    return new OutputFormatter();
  }

  /**
   * {@inheritdoc}
   */
  public function setDecorated($decorated) {

    // do nothing
  }

  /**
   * {@inheritdoc}
   */
  public function isDecorated() {
    return false;
  }

  /**
   * {@inheritdoc}
   */
  public function setVerbosity($level) {

    // do nothing
  }

  /**
   * {@inheritdoc}
   */
  public function getVerbosity() {
    return self::VERBOSITY_QUIET;
  }
  public function isQuiet() {
    return true;
  }
  public function isVerbose() {
    return false;
  }
  public function isVeryVerbose() {
    return false;
  }
  public function isDebug() {
    return false;
  }

  /**
   * {@inheritdoc}
   */
  public function writeln($messages, $type = self::OUTPUT_NORMAL) {

    // do nothing
  }

  /**
   * {@inheritdoc}
   */
  public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) {

    // do nothing
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NullOutput::getFormatter public function Returns current output formatter instance. Overrides OutputInterface::getFormatter
NullOutput::getVerbosity public function Gets the current verbosity of the output. Overrides OutputInterface::getVerbosity
NullOutput::isDebug public function
NullOutput::isDecorated public function Gets the decorated flag. Overrides OutputInterface::isDecorated
NullOutput::isQuiet public function
NullOutput::isVerbose public function
NullOutput::isVeryVerbose public function
NullOutput::setDecorated public function Sets the decorated flag. Overrides OutputInterface::setDecorated
NullOutput::setFormatter public function Sets output formatter. Overrides OutputInterface::setFormatter
NullOutput::setVerbosity public function Sets the verbosity of the output. Overrides OutputInterface::setVerbosity
NullOutput::write public function Writes a message to the output. Overrides OutputInterface::write
NullOutput::writeln public function Writes a message to the output and adds a newline at the end. Overrides OutputInterface::writeln
OutputInterface::OUTPUT_NORMAL constant
OutputInterface::OUTPUT_PLAIN constant
OutputInterface::OUTPUT_RAW constant
OutputInterface::VERBOSITY_DEBUG constant
OutputInterface::VERBOSITY_NORMAL constant
OutputInterface::VERBOSITY_QUIET constant
OutputInterface::VERBOSITY_VERBOSE constant
OutputInterface::VERBOSITY_VERY_VERBOSE constant