ParserInterface
interface ParserInterface (View source)
Contract for a Fusion parser
Methods
Parses the given Fusion source code and returns an object tree as the result.
Sets the given alias to the specified namespace.
Details
array
parse(string $sourceCode, string $contextPathAndFilename = null, array $objectTreeUntilNow = [])
Parses the given Fusion source code and returns an object tree as the result.
void
setObjectTypeNamespace(string $alias, string $namespace)
Sets the given alias to the specified namespace.
The namespaces defined through this setter or through a "namespace" declaration in one of the Fusions are used to resolve a fully qualified Fusion object name while parsing Fusion code.
The alias is the handle by wich the namespace can be referred to. The namespace is, by convention, a package key which must correspond to a namespace used in the prototype definitions for Fusion object types.
The special alias "default" is used as a fallback for resolution of unqualified Fusion object types.