PHP Class League\CommonMark\Block\Element\Heading

Inheritance: extends AbstractBlock, implements League\CommonMark\Block\Element\InlineContainer
Datei anzeigen Open project: colinodell/commonmark-php Class Usage Examples

Protected Properties

Property Type Description
$level integer

Public Methods

Method Description
__construct ( integer $level, string | string[] $contents )
acceptsLines ( ) : boolean Returns true if block type can accept lines of text
canContain ( AbstractBlock $block ) : boolean Returns true if this block can contain the given block as a child node
finalize ( League\CommonMark\ContextInterface $context, $endLineNumber )
getLevel ( ) : integer
handleRemainingContents ( League\CommonMark\ContextInterface $context, Cursor $cursor )
isCode ( ) : boolean Whether this is a code block
matchesNextLine ( Cursor $cursor )

Method Details

__construct() public method

public __construct ( integer $level, string | string[] $contents )
$level integer
$contents string | string[]

acceptsLines() public method

Returns true if block type can accept lines of text
public acceptsLines ( ) : boolean
return boolean

canContain() public method

Returns true if this block can contain the given block as a child node
public canContain ( AbstractBlock $block ) : boolean
$block AbstractBlock
return boolean

finalize() public method

public finalize ( League\CommonMark\ContextInterface $context, $endLineNumber )
$context League\CommonMark\ContextInterface

getLevel() public method

public getLevel ( ) : integer
return integer

handleRemainingContents() public method

public handleRemainingContents ( League\CommonMark\ContextInterface $context, Cursor $cursor )
$context League\CommonMark\ContextInterface
$cursor League\CommonMark\Cursor

isCode() public method

Whether this is a code block
public isCode ( ) : boolean
return boolean

matchesNextLine() public method

public matchesNextLine ( Cursor $cursor )
$cursor League\CommonMark\Cursor

Property Details

$level protected_oe property

protected int $level
return integer