This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php

84 lines
1.7 KiB
PHP
Raw Normal View History

<?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
*/
interface OutputFormatterInterface
{
/**
* Sets the decorated flag.
*
* @param Boolean $decorated Whether to decorate the messages or not
2011-03-24 08:39:53 +00:00
*
* @api
*/
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
*/
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
*/
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
*/
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
*/
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
*/
function format($message);
}