4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Console\Formatter;
15 * Formatter interface for console output.
17 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 interface OutputFormatterInterface
24 * Sets the decorated flag.
26 * @param Boolean $decorated Whether to decorate the messages or not
30 public function setDecorated($decorated);
33 * Gets the decorated flag.
35 * @return Boolean true if the output will decorate messages, false otherwise
39 public function isDecorated();
44 * @param string $name The style name
45 * @param OutputFormatterStyleInterface $style The style instance
49 public function setStyle($name, OutputFormatterStyleInterface $style);
52 * Checks if output formatter has style with specified name.
60 public function hasStyle($name);
63 * Gets style options from style with specified name.
67 * @return OutputFormatterStyleInterface
71 public function getStyle($name);
74 * Formats a message according to the given styles.
76 * @param string $message The message to style
78 * @return string The styled message
82 public function format($message);