class KalimahApps / Daleel / Containers / ContainerParser
final

ContainerParser

Parse custom container.
They are defined by a delimiter of three or more colons.

Extends

    League\...\AbstractBlockContinueParser

Properties

private

$block Division

Div block to be built

Default: null
private

$delim string

Delimiter character for this block

Default: null
private

$class_name string

Class name for this block

Default: null
private

$title string

Title for this block

Default: null

Methods

public

__construct ( string $class_name , string $title , string $delim ) : void

ContainerParser constructor.

Parameters

  • $class_name string
    Class name for this block
  • $title string
    Title for this block
  • $delim string
    Delimiter character for this block
public static

createBlockStartParser ( ) : void

Instantiate a new instance of the BlockStartParserInterface.

public

tryContinue ( League\...\Cursor $cursor , League\...\BlockContinueParserInterface $active_block_parser ) : League\...\BlockContinue

Parse the given line.

Parameters

  • $cursor League\...\Cursor
    Cursor to parse
  • $active_block_parser League\...\BlockContinueParserInterface
    The block parser for the active block
public

closeBlock ( ) : void

Handle when the container is closed.

public

getBlock ( ) : void

Get the block type that this parser understands.

public

isContainer ( ) : void

Set container type to this block.

public

canContain ( League\...\AbstractBlock $child_block ) : bool

Set the container to be able to contain other blocks.

Parameters

  • $child_block League\...\AbstractBlock
    Child block to be contained