W3cubDocs

/Symfony 2.8

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

public __construct(OutputFormatterStyleInterface $emptyStyle = null)

Constructor.

Parameters

OutputFormatterStyleInterface $emptyStyle

public reset()

Resets stack (ie.

empty internal arrays).

public push(OutputFormatterStyleInterface $style)

Pushes a style in the stack.

Parameters

OutputFormatterStyleInterface $style

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

public OutputFormatterStyle getCurrent()

Computes current style with stacks top codes.

Return Value

OutputFormatterStyle

public OutputFormatterStyleStack setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)

Parameters

OutputFormatterStyleInterface $emptyStyle

Return Value

OutputFormatterStyleStack

public OutputFormatterStyleInterface getEmptyStyle()

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.html