2011-03-17 15:50:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony package.
|
|
|
|
*
|
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Symfony\Component\Console\Formatter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Formatter interface for console output.
|
|
|
|
*
|
|
|
|
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
interface OutputFormatterInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Sets the decorated flag.
|
|
|
|
*
|
2011-12-28 09:29:22 +00:00
|
|
|
* @param Boolean $decorated Whether to decorate the messages or not
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function setDecorated($decorated);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the decorated flag.
|
|
|
|
*
|
|
|
|
* @return Boolean true if the output will decorate messages, false otherwise
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function isDecorated();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets a new style.
|
|
|
|
*
|
2011-04-23 16:05:44 +01:00
|
|
|
* @param string $name The style name
|
|
|
|
* @param OutputFormatterStyleInterface $style The style instance
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function setStyle($name, OutputFormatterStyleInterface $style);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if output formatter has style with specified name.
|
|
|
|
*
|
|
|
|
* @param string $name
|
|
|
|
*
|
2011-04-27 06:25:26 +01:00
|
|
|
* @return Boolean
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function hasStyle($name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets style options from style with specified name.
|
|
|
|
*
|
|
|
|
* @param string $name
|
|
|
|
*
|
|
|
|
* @return OutputFormatterStyleInterface
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function getStyle($name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Formats a message according to the given styles.
|
|
|
|
*
|
|
|
|
* @param string $message The message to style
|
|
|
|
*
|
|
|
|
* @return string The styled message
|
2011-03-24 08:39:53 +00:00
|
|
|
*
|
|
|
|
* @api
|
2011-03-17 15:50:42 +00:00
|
|
|
*/
|
|
|
|
function format($message);
|
|
|
|
}
|