SourceFileParser
in package
uses
ValidatesExistence
Parses a source file and returns a new page model instance for it.
Page Parsers are responsible for parsing a source file into a Page object, and may also conduct pre-processing and/or data validation/assembly.
Note that the Page Parsers do not compile any HTML or Markdown.
Table of Contents
Properties
- $identifier : string
- $page : HydePage
Methods
- __construct() : mixed
- get() : HydePage
- constructPage() : HydePage|BladePage|BaseMarkdownPage
- parseBladePage() : BladePage
- parseMarkdownPage() : BaseMarkdownPage
- validateExistence() : void
- Check if a supplied source file exists or throw an exception.
Properties
$identifier
protected
string
$identifier
$page
protected
HydePage
$page
Methods
__construct()
public
__construct(string $pageClass, string $identifier) : mixed
Parameters
- $pageClass : string
- $identifier : string
Tags
get()
public
get() : HydePage
Return values
HydePageconstructPage()
protected
constructPage(string $pageClass) : HydePage|BladePage|BaseMarkdownPage
Parameters
- $pageClass : string
Return values
HydePage|BladePage|BaseMarkdownPageparseBladePage()
protected
parseBladePage() : BladePage
Return values
BladePageparseMarkdownPage()
protected
parseMarkdownPage(BaseMarkdownPage> $pageClass) : BaseMarkdownPage
Parameters
- $pageClass : BaseMarkdownPage>
Return values
BaseMarkdownPagevalidateExistence()
Check if a supplied source file exists or throw an exception.
protected
static validateExistence(HydePage> $pageClass, string $identifier) : void
Parameters
- $pageClass : HydePage>
- $identifier : string