Copied!

Formatter class for console output.

Cloneable Instantiable
Methods
public __clone ()
public __construct ( bool $decorated = false , array $styles = [ ] )
 

Initializes console output formatter.

public static escape ( string $text ) : string
 

Escapes "<" and ">" special chars in given text.

public static escapeTrailingBackslash ( string $text ) : string
 

Escapes trailing "\" in given text.

  • internal
public format ( ? string $message ) : ? string
 
public formatAndWrap ( ? string $message , int $width )
 
public getStyle ( string $name ) : Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
 
public getStyleStack () : Symfony\Component\Console\Formatter\OutputFormatterStyleStack
public hasStyle ( string $name ) : bool
 
public isDecorated () : bool
 
public setDecorated ( bool $decorated )
 
public setStyle ( string $name , Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style )
 
Properties
private bool $decorated
private array $styles
private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack
Methods
private applyCurrentStyle ( string $text , string $current , int $width , int $currentLineLength ) : string
 

Applies current style from stack to text, if must be applied.

private createStyleFromString ( string $string ) : ? Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
 

Tries to create new style instance from string.

Methods
public static escape ( string $text ) : string
 

Escapes "<" and ">" special chars in given text.

public static escapeTrailingBackslash ( string $text ) : string
 

Escapes trailing "\" in given text.

  • internal
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration