W3cubDocs

/Symfony 4.1

OutputFormatterStyleStack

class OutputFormatterStyleStack

Methods

__construct(OutputFormatterStyleInterface $emptyStyle = null)
reset()

Resets stack (ie. empty internal arrays).

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.

$this setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)
OutputFormatterStyleInterface getEmptyStyle()

Details

__construct(OutputFormatterStyleInterface $emptyStyle = null)

Parameters

OutputFormatterStyleInterface $emptyStyle

reset()

Resets stack (ie. empty internal arrays).

push(OutputFormatterStyleInterface $style)

Pushes a style in the stack.

Parameters

OutputFormatterStyleInterface $style

OutputFormatterStyleInterface pop(OutputFormatterStyleInterface $style = null)

Pops a style from the stack.

Parameters

OutputFormatterStyleInterface $style

Return Value

OutputFormatterStyleInterface

Exceptions

InvalidArgumentException When style tags incorrectly nested

OutputFormatterStyle getCurrent()

Computes current style with stacks top codes.

Return Value

OutputFormatterStyle

$this setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)

Parameters

OutputFormatterStyleInterface $emptyStyle

Return Value

$this

OutputFormatterStyleInterface getEmptyStyle()

Return Value

OutputFormatterStyleInterface

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.html