Toc
class Toc implements Stringable
Properties
protected ConverterInterface[] | $converters | The converter array |
|
protected | $data | The markdown string for the converter |
|
protected Item[] | $lines | The line array |
|
protected | $sections | The section array |
Methods
__construct(string $markdown)
Constructor
string|null
getSectionTitle(string $title)
Get the section title
array
getLines()
Get the toc line array from a markdown string
addConverters(array $converters)
Add converters to the converter array
string
__toString()
Implement Stringable
Interface
array
toArray()
Output the navigation data
Details
at line 44
__construct(string $markdown)
Constructor
at line 57
protected Toc
normalize()
Converts markdown string using the converters provided
at line 73
protected Toc
mapping()
Map lines to Item instance
at line 85
protected Toc
grouping()
No description
at line 109
string|null
getSectionTitle(string $title)
Get the section title
at line 127
array
getLines()
Get the toc line array from a markdown string
at line 138
Item
getLine(int $lineNumber)
Get the toc nth line from a markdown string
at line 148
Toc
addConverters(array $converters)
Add converters to the converter array
at line 160
string
__toString()
Implement Stringable
Interface
at line 170
array
toArray()
Output the navigation data
at line 180
static Toc
of(string $markdown)
Factory