Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Console\Formatter; Chris@0: Chris@0: /** Chris@0: * Formatter interface for console output. Chris@0: * Chris@0: * @author Konstantin Kudryashov Chris@0: */ Chris@0: interface OutputFormatterInterface Chris@0: { Chris@0: /** Chris@0: * Sets the decorated flag. Chris@0: * Chris@0: * @param bool $decorated Whether to decorate the messages or not Chris@0: */ Chris@0: public function setDecorated($decorated); Chris@0: Chris@0: /** Chris@0: * Gets the decorated flag. Chris@0: * Chris@0: * @return bool true if the output will decorate messages, false otherwise Chris@0: */ Chris@0: public function isDecorated(); Chris@0: Chris@0: /** Chris@0: * Sets a new style. Chris@0: * Chris@0: * @param string $name The style name Chris@0: * @param OutputFormatterStyleInterface $style The style instance Chris@0: */ Chris@0: public function setStyle($name, OutputFormatterStyleInterface $style); Chris@0: Chris@0: /** Chris@0: * Checks if output formatter has style with specified name. Chris@0: * Chris@0: * @param string $name Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function hasStyle($name); Chris@0: Chris@0: /** Chris@0: * Gets style options from style with specified name. Chris@0: * Chris@0: * @param string $name Chris@0: * Chris@0: * @return OutputFormatterStyleInterface Chris@0: * Chris@0: * @throws \InvalidArgumentException When style isn't defined Chris@0: */ Chris@0: public function getStyle($name); Chris@0: Chris@0: /** Chris@0: * Formats a message according to the given styles. Chris@0: * Chris@0: * @param string $message The message to style Chris@0: * Chris@0: * @return string The styled message Chris@0: */ Chris@0: public function format($message); Chris@0: }