API Documentation

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

Methods

__construct()

public __construct(string $pageClass, string $identifier) : mixed
Parameters
$pageClass : string
$identifier : string
Tags
throws
FileNotFoundException

If the file does not exist.

validateExistence()

Check if a supplied source file exists or throw an exception.

protected static validateExistence(HydePage> $pageClass, string $identifier) : void
Parameters
$pageClass : HydePage>
$identifier : string
Tags
throws
FileNotFoundException

If the file does not exist.


        
On this page

Search results