class NullOutputFormatter
@author Tien Xuan Vo <tien.xuan.vo@gmail.com>
Hierarchy
- class \Symfony\Component\Console\Formatter\NullOutputFormatter implements \Symfony\Component\Console\Formatter\OutputFormatterInterface
Expanded class hierarchy of NullOutputFormatter
1 file declares its use of NullOutputFormatter
- NullOutput.php in vendor/
symfony/ console/ Output/ NullOutput.php
File
-
vendor/
symfony/ console/ Formatter/ NullOutputFormatter.php, line 17
Namespace
Symfony\Component\Console\FormatterView source
final class NullOutputFormatter implements OutputFormatterInterface {
private NullOutputFormatterStyle $style;
public function format(?string $message) : ?string {
return null;
}
public function getStyle(string $name) : OutputFormatterStyleInterface {
// to comply with the interface we must return a OutputFormatterStyleInterface
return $this->style ??= new NullOutputFormatterStyle();
}
public function hasStyle(string $name) : bool {
return false;
}
public function isDecorated() : bool {
return false;
}
public function setDecorated(bool $decorated) : void {
// do nothing
}
public function setStyle(string $name, OutputFormatterStyleInterface $style) : void {
// do nothing
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
NullOutputFormatter::$style | private | property | ||
NullOutputFormatter::format | public | function | Formats a message according to the given styles. | Overrides OutputFormatterInterface::format |
NullOutputFormatter::getStyle | public | function | Gets style options from style with specified name. | Overrides OutputFormatterInterface::getStyle |
NullOutputFormatter::hasStyle | public | function | Checks if output formatter has style with specified name. | Overrides OutputFormatterInterface::hasStyle |
NullOutputFormatter::isDecorated | public | function | Whether the output will decorate messages. | Overrides OutputFormatterInterface::isDecorated |
NullOutputFormatter::setDecorated | public | function | Sets the decorated flag. | Overrides OutputFormatterInterface::setDecorated |
NullOutputFormatter::setStyle | public | function | Sets a new style. | Overrides OutputFormatterInterface::setStyle |