Synergy 8 Scripting Engine

Class Methods

The following methods can be invoked on instances of this class.

setup()

getExpression(mixed strScript)

Parses Synergy 8 script

convertExpressionToString(array arrExpression)

Converts an expression array or object back to a string
Useful for debugging

parsePartFlattenExpression(mixed arrExpression, array arrResult)

Flattens a multi-dimensional array into a flat array
This is a helper method for parsePartBinaryOperations

parseIsolateSymbols(mixed arrExpression, array arrSymbols)

Isolates symbols in an expression to make them seperate to other text entities

parsePart(mixed strPartFunction, array arrExpression)

Runs a parse part function

parsePartSemiColons(mixed arrExpression)

Deterimines the location of round brackets for evaluation grouping

parsePartRoundBrackets(mixed arrExpression)

Deterimines the location of round brackets for evaluation grouping

parsePartSingleQuotes(mixed arrExpression)

Finds single quoted strings

parsePartVariables(string strPart, mixed arrExpression, mixed iIndex)

Finds variables

parsePartConstants(string strPart)

Finds constants such as numbers, true, false and null

parsePartSquareBrackets(mixed arrExpression)

Deterimines the location of square brackets

parsePartNotOperator(mixed arrExpression)

Finds binary operations and returns an expression tree

parsePartBinaryOperations(mixed arrExpression)

Finds binary operations and returns an expression tree

parsePartTernaryOperations(mixed arrExpression)

Finds ternary operations and returns an expression tree

parsePartFunctions(mixed arrExpression)

Finds functions

parseRecursive(mixed arrExpression, mixed bEvalBinary)

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class