PHP Class Webmozart\Console\UI\Layout\BlockLayout

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements Webmozart\Console\UI\Component
Exibir arquivo Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( ) Creates a new layout.
add ( Webmozart\Console\UI\Component $element ) : static Adds a renderable element to the layout.
beginBlock ( ) : static Starts a new indented block.
endBlock ( ) : static Ends the current indented block.
render ( IO $io, integer $indentation ) Renders all elements in the layout.

Method Details

__construct() public method

Creates a new layout.
public __construct ( )

add() public method

Adds a renderable element to the layout.
public add ( Webmozart\Console\UI\Component $element ) : static
$element Webmozart\Console\UI\Component The element to add.
return static The current instance.

beginBlock() public method

Starts a new indented block.
public beginBlock ( ) : static
return static The current instance.

endBlock() public method

Ends the current indented block.
public endBlock ( ) : static
return static The current instance.

render() public method

Renders all elements in the layout.
public render ( IO $io, integer $indentation )
$io Webmozart\Console\Api\IO\IO The I/O.
$indentation integer The number of spaces to indent.