interface ParserInterface (View source)

Contract for a Fusion parser

Methods

array
parse(string $sourceCode, string|null $contextPathAndFilename = null, array $mergedArrayTreeUntilNow = [])

Parses the given Fusion source code, resolves includes and returns a merged array tree as the result.

Details

array parse(string $sourceCode, string|null $contextPathAndFilename = null, array $mergedArrayTreeUntilNow = [])

Parses the given Fusion source code, resolves includes and returns a merged array tree as the result.

Parameters

string $sourceCode

The Fusion source code to parse

string|null $contextPathAndFilename

An optional path and filename used for relative Fusion file includes

array $mergedArrayTreeUntilNow

Used internally for keeping track of the built merged array tree

Return Value

array

The merged array tree for the Fusion runtime, generated from the source code

Exceptions

Exception