- Full name:
\Symfony\Component\Console\Formatter\OutputFormatterStyleStack
- This class implements:
\Symfony\Contracts\Service\ResetInterface
private \Symfony\Component\Console\Formatter\OutputFormatterStyleInterface[] $styles
private $emptyStyle
public __construct(\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $emptyStyle = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$emptyStyle |
\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface |
Resets stack (ie. empty internal arrays).
public reset(): mixed
Pushes a style in the stack.
public push(\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$style |
\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface |
Pops a style from the stack.
public pop(\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style = null): \Symfony\Component\Console\Formatter\OutputFormatterStyleInterface
Parameters:
Parameter | Type | Description |
---|---|---|
$style |
\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface |
Computes current style with stacks top codes.
public getCurrent(): \Symfony\Component\Console\Formatter\OutputFormatterStyle
public setEmptyStyle(\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $emptyStyle): $this
Parameters:
Parameter | Type | Description |
---|---|---|
$emptyStyle |
\Symfony\Component\Console\Formatter\OutputFormatterStyleInterface |
public getEmptyStyle(): \Symfony\Component\Console\Formatter\OutputFormatterStyleInterface