PHP Class Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\Processor

Inheritance: implements League\CommonMark\DocumentProcessorInterface
显示文件 Open project: justinwalsh/daux.io

Protected Properties

Property Type Description
$config

Public Methods

Method Description
__construct ( Config $config )
generate ( Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\Entry[] $headings ) : Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\RootEntry Make a tree of the list of headings
hasAutoTOC ( )
processDocument ( Document $document ) : void

Protected Methods

Method Description
cloneChildren ( Heading $node ) : League\CommonMark\Node\Node[]
ensureHeadingHasId ( Heading $node )
render ( array $entries ) : League\CommonMark\Block\Element\ListBlock
setNull ( Heading $object, string $property ) Set the specified property to null on the object.

Method Details

__construct() public method

public __construct ( Config $config )
$config Todaymade\Daux\Config

cloneChildren() protected method

protected cloneChildren ( Heading $node ) : League\CommonMark\Node\Node[]
$node League\CommonMark\Block\Element\Heading
return League\CommonMark\Node\Node[]

ensureHeadingHasId() protected method

protected ensureHeadingHasId ( Heading $node )
$node League\CommonMark\Block\Element\Heading

generate() public method

Make a tree of the list of headings
public generate ( Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\Entry[] $headings ) : Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\RootEntry
$headings Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\Entry[]
return Todaymade\Daux\Format\HTML\ContentTypes\Markdown\TOC\RootEntry

hasAutoTOC() public method

public hasAutoTOC ( )

processDocument() public method

public processDocument ( Document $document ) : void
$document League\CommonMark\Block\Element\Document
return void

render() protected method

protected render ( array $entries ) : League\CommonMark\Block\Element\ListBlock
$entries array
return League\CommonMark\Block\Element\ListBlock

setNull() protected method

Set the specified property to null on the object.
protected setNull ( Heading $object, string $property )
$object League\CommonMark\Block\Element\Heading The object to modify
$property string The property to nullify

Property Details

$config protected_oe property

protected $config