WrappableOutputFormatterInterface
extends
OutputFormatterInterface
in
Formatter interface for console output that supports word wrapping.
Tags
Table of Contents
- format() : mixed
- Formats a message according to the given styles.
- formatAndWrap() : mixed
- Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
- getStyle() : OutputFormatterStyleInterface
- Gets style options from style with specified name.
- hasStyle() : bool
- Checks if output formatter has style with specified name.
- isDecorated() : bool
- Gets the decorated flag.
- setDecorated() : mixed
- Sets the decorated flag.
- setStyle() : mixed
- Sets a new style.
Methods
format()
Formats a message according to the given styles.
public
format(string|null $message) : mixed
Parameters
- $message : string|null
Return values
mixed —formatAndWrap()
Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
public
formatAndWrap(string|null $message, int $width) : mixed
Parameters
- $message : string|null
- $width : int
Return values
mixed —getStyle()
Gets style options from style with specified name.
public
getStyle(string $name) : OutputFormatterStyleInterface
Parameters
- $name : string
Tags
Return values
OutputFormatterStyleInterface —hasStyle()
Checks if output formatter has style with specified name.
public
hasStyle(string $name) : bool
Parameters
- $name : string
Return values
bool —isDecorated()
Gets the decorated flag.
public
isDecorated() : bool
Return values
bool —true if the output will decorate messages, false otherwise
setDecorated()
Sets the decorated flag.
public
setDecorated(bool $decorated) : mixed
Parameters
- $decorated : bool
Return values
mixed —setStyle()
Sets a new style.
public
setStyle(string $name, OutputFormatterStyleInterface $style) : mixed
Parameters
- $name : string
- $style : OutputFormatterStyleInterface