FileParser
class FileParser
FileParser class.
Constants
SOURCE_SEPARATOR |
|
Properties
protected Model | $object | ||
static protected FileSystem | $fileCache |
Methods
Parses a page or layout file content.
Renders a page or layout object as file content.
No description
Compile a page or layout file content as object.
No description
No description
Runs the object's PHP file and returns the corresponding object.
No description
Extracts the class name from a cache file
Details
at line 46
static array
parse(string $content)
Parses a page or layout file content.
The expected file format is following:
--- Data (frontmatter) section --- PHP code section --- Html markup section
If the content has only 2 sections they are considered as Data and Html. If there is only a single section, it is considered as Html.
at line 93
static string
render($data)
Renders a page or layout object as file content.
at line 121
process()
No description
at line 166
protected string
compile($path)
Compile a page or layout file content as object.
at line 211
static FileParser
on($object)
No description
at line 220
static
setCache($fileCache)
No description
at line 234
mixed
source(Page $page, Layout $layout, MainController $controller)
Runs the object's PHP file and returns the corresponding object.
at line 250
protected
handleCorruptCache($data)
No description
at line 273
protected string
extractClassFromFile($path)
Extracts the class name from a cache file