Symfony API
Class

Symfony\Component\Console\Formatter\OutputFormatterStyleStack

class OutputFormatterStyleStack

Methods

__construct(OutputFormatterStyleInterface $emptyStyle = null)

Constructor.

reset()

Resets stack (ie.

push(OutputFormatterStyleInterface $style)

Pushes a style in the stack.

OutputFormatterStyleInterface pop(OutputFormatterStyleInterface $style = null)

Pops a style from the stack.

OutputFormatterStyle getCurrent()

Computes current style with stacks top codes.

OutputFormatterStyleStack setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)

OutputFormatterStyleInterface getEmptyStyle()

Details

at line 36
public __construct(OutputFormatterStyleInterface $emptyStyle = null)

Constructor.

Parameters

OutputFormatterStyleInterface $emptyStyle

at line 45
public reset()

Resets stack (ie.

empty internal arrays).

at line 55
public push(OutputFormatterStyleInterface $style)

Pushes a style in the stack.

Parameters

OutputFormatterStyleInterface $style

at line 69
public OutputFormatterStyleInterface pop(OutputFormatterStyleInterface $style = null)

Pops a style from the stack.

Parameters

OutputFormatterStyleInterface $style

Return Value

OutputFormatterStyleInterface

Exceptions

InvalidArgumentException When style tags incorrectly nested

at line 95
public OutputFormatterStyle getCurrent()

Computes current style with stacks top codes.

Return Value

OutputFormatterStyle

at line 109
public OutputFormatterStyleStack setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)

Parameters

OutputFormatterStyleInterface $emptyStyle

Return Value

OutputFormatterStyleStack

at line 119
public OutputFormatterStyleInterface getEmptyStyle()