PHP 클래스 Symfony\Component\Console\Formatter\OutputFormatter

저자: Konstantin Kudryashov ([email protected])
상속: implements Symfony\Component\Console\Formatter\OutputFormatterInterface
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( boolean $decorated = false, array $styles = [] ) Initializes console output formatter.
escape ( string $text ) : string Escapes "<" special char in given text.
escapeTrailingBackslash ( string $text ) : string Escapes trailing "\" in given text.
format ( string $message ) : string Formats a message according to the given styles.
getStyle ( string $name ) : Symfony\Component\Console\Formatter\OutputFormatterStyleInterface Gets style options from style with specified name.
getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack
hasStyle ( string $name ) : boolean Checks if output formatter has style with specified name.
isDecorated ( ) : boolean Gets the decorated flag.
setDecorated ( boolean $decorated ) Sets the decorated flag.
setStyle ( string $name, Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style ) Sets a new style.

비공개 메소드들

메소드 설명
applyCurrentStyle ( string $text ) : string Applies current style from stack to text, if must be applied.
createStyleFromString ( string $string ) : Symfony\Component\Console\Formatter\OutputFormatterStyle | boolean Tries to create new style instance from string.

메소드 상세

__construct() 공개 메소드

Initializes console output formatter.
public __construct ( boolean $decorated = false, array $styles = [] )
$decorated boolean Whether this formatter should actually decorate strings
$styles array Array of "name => FormatterStyle" instances

escape() 공개 정적인 메소드

Escapes "<" special char in given text.
public static escape ( string $text ) : string
$text string Text to escape
리턴 string Escaped text

escapeTrailingBackslash() 공개 정적인 메소드

Escapes trailing "\" in given text.
public static escapeTrailingBackslash ( string $text ) : string
$text string Text to escape
리턴 string Escaped text

format() 공개 메소드

Formats a message according to the given styles.
public format ( string $message ) : string
$message string The message to style
리턴 string The styled message

getStyle() 공개 메소드

Gets style options from style with specified name.
public getStyle ( string $name ) : Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
$name string
리턴 Symfony\Component\Console\Formatter\OutputFormatterStyleInterface

getStyleStack() 공개 메소드

public getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack
리턴 Symfony\Component\Console\Formatter\OutputFormatterStyleStack

hasStyle() 공개 메소드

Checks if output formatter has style with specified name.
public hasStyle ( string $name ) : boolean
$name string
리턴 boolean

isDecorated() 공개 메소드

Gets the decorated flag.
public isDecorated ( ) : boolean
리턴 boolean true if the output will decorate messages, false otherwise

setDecorated() 공개 메소드

Sets the decorated flag.
public setDecorated ( boolean $decorated )
$decorated boolean Whether to decorate the messages or not

setStyle() 공개 메소드

Sets a new style.
public setStyle ( string $name, Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style )
$name string The style name
$style Symfony\Component\Console\Formatter\OutputFormatterStyleInterface The style instance