You are here

abstract class OutputStyle in Zircon Profile 8

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

Decorates output to add console style guide helpers.

@author Kevin Bond <kevinbond@gmail.com>

Hierarchy

Expanded class hierarchy of OutputStyle

File

vendor/symfony/console/Style/OutputStyle.php, line 23

Namespace

Symfony\Component\Console\Style
View source
abstract class OutputStyle implements OutputInterface, StyleInterface {
  private $output;

  /**
   * @param OutputInterface $output
   */
  public function __construct(OutputInterface $output) {
    $this->output = $output;
  }

  /**
   * {@inheritdoc}
   */
  public function newLine($count = 1) {
    $this->output
      ->write(str_repeat(PHP_EOL, $count));
  }

  /**
   * @param int $max
   *
   * @return ProgressBar
   */
  public function createProgressBar($max = 0) {
    return new ProgressBar($this->output, $max);
  }

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

  /**
   * {@inheritdoc}
   */
  public function writeln($messages, $type = self::OUTPUT_NORMAL) {
    $this->output
      ->writeln($messages, $type);
  }

  /**
   * {@inheritdoc}
   */
  public function setVerbosity($level) {
    $this->output
      ->setVerbosity($level);
  }

  /**
   * {@inheritdoc}
   */
  public function getVerbosity() {
    return $this->output
      ->getVerbosity();
  }

  /**
   * {@inheritdoc}
   */
  public function setDecorated($decorated) {
    $this->output
      ->setDecorated($decorated);
  }

  /**
   * {@inheritdoc}
   */
  public function isDecorated() {
    return $this->output
      ->isDecorated();
  }

  /**
   * {@inheritdoc}
   */
  public function setFormatter(OutputFormatterInterface $formatter) {
    $this->output
      ->setFormatter($formatter);
  }

  /**
   * {@inheritdoc}
   */
  public function getFormatter() {
    return $this->output
      ->getFormatter();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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
OutputStyle::$output private property
OutputStyle::createProgressBar public function 1
OutputStyle::getFormatter public function Returns current output formatter instance. Overrides OutputInterface::getFormatter
OutputStyle::getVerbosity public function Gets the current verbosity of the output. Overrides OutputInterface::getVerbosity
OutputStyle::isDecorated public function Gets the decorated flag. Overrides OutputInterface::isDecorated
OutputStyle::newLine public function Add newline(s). Overrides StyleInterface::newLine 1
OutputStyle::setDecorated public function Sets the decorated flag. Overrides OutputInterface::setDecorated
OutputStyle::setFormatter public function Sets output formatter. Overrides OutputInterface::setFormatter
OutputStyle::setVerbosity public function Sets the verbosity of the output. Overrides OutputInterface::setVerbosity
OutputStyle::write public function Writes a message to the output. Overrides OutputInterface::write 1
OutputStyle::writeln public function Writes a message to the output and adds a newline at the end. Overrides OutputInterface::writeln 1
OutputStyle::__construct public function 1
StyleInterface::ask public function Asks a question. 1
StyleInterface::askHidden public function Asks a question with the user input hidden. 1
StyleInterface::caution public function Formats a caution admonition. 1
StyleInterface::choice public function Asks a choice question. 1
StyleInterface::confirm public function Asks for confirmation. 1
StyleInterface::error public function Formats an error result bar. 1
StyleInterface::listing public function Formats a list. 1
StyleInterface::note public function Formats a note admonition. 1
StyleInterface::progressAdvance public function Advances the progress output X steps. 1
StyleInterface::progressFinish public function Finishes the progress output. 1
StyleInterface::progressStart public function Starts the progress output. 1
StyleInterface::section public function Formats a section title. 1
StyleInterface::success public function Formats a success result bar. 1
StyleInterface::table public function Formats a table. 1
StyleInterface::text public function Formats informational text. 1
StyleInterface::title public function Formats a command title. 1
StyleInterface::warning public function Formats an warning result bar. 1