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\Output; Chris@0: Chris@0: use Symfony\Component\Console\Formatter\OutputFormatterInterface; Chris@0: Chris@0: /** Chris@0: * OutputInterface is the interface implemented by all Output classes. Chris@0: * Chris@0: * @author Fabien Potencier Chris@0: */ Chris@0: interface OutputInterface Chris@0: { Chris@0: const VERBOSITY_QUIET = 16; Chris@0: const VERBOSITY_NORMAL = 32; Chris@0: const VERBOSITY_VERBOSE = 64; Chris@0: const VERBOSITY_VERY_VERBOSE = 128; Chris@0: const VERBOSITY_DEBUG = 256; Chris@0: Chris@0: const OUTPUT_NORMAL = 1; Chris@0: const OUTPUT_RAW = 2; Chris@0: const OUTPUT_PLAIN = 4; Chris@0: Chris@0: /** Chris@0: * Writes a message to the output. Chris@0: * Chris@17: * @param string|array $messages The message as an array of strings or a single string Chris@0: * @param bool $newline Whether to add a newline Chris@0: * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL Chris@0: */ Chris@0: public function write($messages, $newline = false, $options = 0); Chris@0: Chris@0: /** Chris@0: * Writes a message to the output and adds a newline at the end. Chris@0: * Chris@17: * @param string|array $messages The message as an array of strings or a single string Chris@0: * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL Chris@0: */ Chris@0: public function writeln($messages, $options = 0); Chris@0: Chris@0: /** Chris@0: * Sets the verbosity of the output. Chris@0: * Chris@0: * @param int $level The level of verbosity (one of the VERBOSITY constants) Chris@0: */ Chris@0: public function setVerbosity($level); Chris@0: Chris@0: /** Chris@0: * Gets the current verbosity of the output. Chris@0: * Chris@0: * @return int The current level of verbosity (one of the VERBOSITY constants) Chris@0: */ Chris@0: public function getVerbosity(); Chris@0: Chris@0: /** Chris@0: * Returns whether verbosity is quiet (-q). Chris@0: * Chris@0: * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise Chris@0: */ Chris@0: public function isQuiet(); Chris@0: Chris@0: /** Chris@0: * Returns whether verbosity is verbose (-v). Chris@0: * Chris@0: * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise Chris@0: */ Chris@0: public function isVerbose(); Chris@0: Chris@0: /** Chris@0: * Returns whether verbosity is very verbose (-vv). Chris@0: * Chris@0: * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise Chris@0: */ Chris@0: public function isVeryVerbose(); Chris@0: Chris@0: /** Chris@0: * Returns whether verbosity is debug (-vvv). Chris@0: * Chris@0: * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise Chris@0: */ Chris@0: public function isDebug(); Chris@0: Chris@0: /** Chris@0: * Sets the decorated flag. Chris@0: * Chris@0: * @param bool $decorated Whether to decorate the messages 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: public function setFormatter(OutputFormatterInterface $formatter); Chris@0: Chris@0: /** Chris@0: * Returns current output formatter instance. Chris@0: * Chris@0: * @return OutputFormatterInterface Chris@0: */ Chris@0: public function getFormatter(); Chris@0: }