PHP Class League\CommonMark\Block\Element\AbstractBlock

Inheritance: extends League\CommonMark\Node\Node
Datei anzeigen Open project: colinodell/commonmark-php Class Usage Examples

Public Properties

Property Type Description
$data array Used for storage of arbitrary data.

Protected Properties

Property Type Description
$endLine integer
$finalStringContents string
$lastLineBlank boolean
$open boolean
$startLine integer
$strings League\CommonMark\Util\ArrayCollection | string[]

Public Methods

Method Description
__construct ( ) Constructor
acceptsLines ( ) : boolean Returns true if block type can accept lines of text
addLine ( string $line )
canContain ( AbstractBlock $block ) : boolean Returns true if this block can contain the given block as a child node
endsWithBlankLine ( ) : boolean Whether the block ends with a blank line
finalize ( League\CommonMark\ContextInterface $context, integer $endLineNumber ) Finalize the block; mark it closed for modification
getData ( string $key, mixed $default = null ) : mixed
getEndLine ( ) : integer
getStartLine ( ) : integer
getStringContent ( ) : string
getStrings ( ) : string[]
handleRemainingContents ( League\CommonMark\ContextInterface $context, Cursor $cursor )
hasChildren ( ) : boolean
isCode ( ) : boolean Whether this is a code block
isContainer ( ) : boolean
isOpen ( ) : boolean Whether the block is open for modifications
matchesNextLine ( Cursor $cursor ) : boolean
setEndLine ( $endLine )
setLastLineBlank ( boolean $blank )
setStartLine ( integer $startLine )
shouldLastLineBeBlank ( Cursor $cursor, integer $currentLineNumber ) : boolean Determines whether the last line should be marked as blank

Protected Methods

Method Description
setParent ( League\CommonMark\Node\Node $node = null )

Method Details

__construct() public method

Constructor
public __construct ( )

acceptsLines() abstract public method

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

addLine() public method

public addLine ( string $line )
$line string

canContain() abstract public method

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

endsWithBlankLine() public method

Whether the block ends with a blank line
public endsWithBlankLine ( ) : boolean
return boolean

finalize() public method

Finalize the block; mark it closed for modification
public finalize ( League\CommonMark\ContextInterface $context, integer $endLineNumber )
$context League\CommonMark\ContextInterface
$endLineNumber integer

getData() public method

public getData ( string $key, mixed $default = null ) : mixed
$key string
$default mixed
return mixed

getEndLine() public method

public getEndLine ( ) : integer
return integer

getStartLine() public method

public getStartLine ( ) : integer
return integer

getStringContent() public method

public getStringContent ( ) : string
return string

getStrings() public method

public getStrings ( ) : string[]
return string[]

handleRemainingContents() public method

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

hasChildren() public method

public hasChildren ( ) : boolean
return boolean

isCode() abstract public method

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

isContainer() public method

public isContainer ( ) : boolean
return boolean

isOpen() public method

Whether the block is open for modifications
public isOpen ( ) : boolean
return boolean

matchesNextLine() abstract public method

abstract public matchesNextLine ( Cursor $cursor ) : boolean
$cursor League\CommonMark\Cursor
return boolean

setEndLine() public method

public setEndLine ( $endLine )

setLastLineBlank() public method

public setLastLineBlank ( boolean $blank )
$blank boolean

setParent() protected method

protected setParent ( League\CommonMark\Node\Node $node = null )
$node League\CommonMark\Node\Node

setStartLine() public method

public setStartLine ( integer $startLine )
$startLine integer

shouldLastLineBeBlank() public method

Determines whether the last line should be marked as blank
public shouldLastLineBeBlank ( Cursor $cursor, integer $currentLineNumber ) : boolean
$cursor League\CommonMark\Cursor
$currentLineNumber integer
return boolean

Property Details

$data public_oe property

Used for storage of arbitrary data.
public array $data
return array

$endLine protected_oe property

protected int $endLine
return integer

$finalStringContents protected_oe property

protected string $finalStringContents
return string

$lastLineBlank protected_oe property

protected bool $lastLineBlank
return boolean

$open protected_oe property

protected bool $open
return boolean

$startLine protected_oe property

protected int $startLine
return integer

$strings protected_oe property

protected ArrayCollection,League\CommonMark\Util|string[] $strings
return League\CommonMark\Util\ArrayCollection | string[]