MarkdownFileParser
in package
Prepares a Markdown file for further usage by extracting the Front Matter and Markdown body, and creating MarkdownDocument object from them.
Table of Contents
Properties
- $markdown : string
- The extracted Markdown body.
- $matter : array<string|int, mixed>
- The extracted Front Matter.
Methods
- parse() : MarkdownDocument
- __construct() : mixed
- get() : MarkdownDocument
Properties
$markdown
The extracted Markdown body.
protected
string
$markdown
= ''
$matter
The extracted Front Matter.
protected
array<string|int, mixed>
$matter
= []
Methods
parse()
public
static parse(string $path) : MarkdownDocument
Parameters
- $path : string
-
The path to the Markdown file tp parse.
Return values
MarkdownDocument —The processed Markdown file as a MarkdownDocument.
__construct()
protected
__construct(string $path) : mixed
Parameters
- $path : string
get()
protected
get() : MarkdownDocument