Constants

TICKINTERVAL

TICKINTERVAL

VAR_ScriptStart

VAR_ScriptStart

VAR_LoopCounter

VAR_LoopCounter

VAR_LastTick

VAR_LastTick

Properties

$includes

$includes : array<mixed,\FML\Script\ScriptInclude>

Type

array<mixed,\FML\Script\ScriptInclude> — Script Includes

$constants

$constants : array<mixed,\FML\Script\ScriptConstant>

Type

array<mixed,\FML\Script\ScriptConstant> — Script Constants

$functions

$functions : array<mixed,\FML\Script\ScriptFunction>

Type

array<mixed,\FML\Script\ScriptFunction> — Script Functions

$customLabels

$customLabels : array<mixed,\FML\Script\ScriptLabel>

Type

array<mixed,\FML\Script\ScriptLabel> — Custom Script Labels

$genericLabels

$genericLabels : array<mixed,\FML\Script\ScriptLabel>

Type

array<mixed,\FML\Script\ScriptLabel> — Generic Script Labels

Methods

setScriptInclude()

setScriptInclude(string|\FML\Script\ScriptInclude  $file, string  $namespace = null) : static

Set a Script Include

Parameters

string|\FML\Script\ScriptInclude $file

Include file or ScriptInclude

string $namespace

Include namespace

Returns

static

addScriptConstant()

addScriptConstant(string|\FML\Script\ScriptConstant  $name, string  $value = null) : static

Add a Script Constant

Parameters

string|\FML\Script\ScriptConstant $name

Constant name or ScriptConstant

string $value

Constant value

Returns

static

addScriptFunction()

addScriptFunction(string|\FML\Script\ScriptFunction  $name, string  $text = null) : static

Add a Script Function

Parameters

string|\FML\Script\ScriptFunction $name

Function name or ScriptFunction

string $text

Function text

Returns

static

addCustomScriptLabel()

addCustomScriptLabel(string|\FML\Script\ScriptLabel  $name, string  $text = null) : static

Add a custom Script text

Parameters

string|\FML\Script\ScriptLabel $name

Label name or ScriptLabel

string $text

Script text

Returns

static

appendGenericScriptLabel()

appendGenericScriptLabel(string|\FML\Script\ScriptLabel  $name, string  $text = null, boolean  $isolated = false) : static

Append a generic Script text for the next rendering

Parameters

string|\FML\Script\ScriptLabel $name

Label name or ScriptLabel

string $text

Script text

boolean $isolated

(optional) Whether to isolate the Label Script

Returns

static

resetGenericScriptLabels()

resetGenericScriptLabels() : static

Remove all generic Script texts

Returns

static

addFeature()

addFeature(\FML\Script\Features\ScriptFeature  $feature) : static

Add a Script Feature

Parameters

\FML\Script\Features\ScriptFeature $feature

Script Feature

Returns

static

loadFeature()

loadFeature(\FML\Script\Features\ScriptFeature  $scriptFeature) : static

Load the given Script Feature

Parameters

\FML\Script\Features\ScriptFeature $scriptFeature

Script Feature to load

Returns

static

loadFeatures()

loadFeatures(array<mixed,\FML\Script\Features\ScriptFeature>  $scriptFeatures) : static

Load the given Script Features

Parameters

array<mixed,\FML\Script\Features\ScriptFeature> $scriptFeatures

Script Features to load

Returns

static

needsRendering()

needsRendering() : boolean

Check if the Script has content so that it needs to be rendered

Returns

boolean

buildScriptText()

buildScriptText() : string

Build the complete Script text

Returns

string

render()

render(\DOMDocument  $domDocument) : \DOMElement

Render the Script

Parameters

\DOMDocument $domDocument

DOMDocument for which the Script should be created

Returns

\DOMElement

__toString()

__toString() : string

Get the string representation

Returns

string

getHeaderComment()

getHeaderComment() : string

Get the header comment

Returns

string

getIncludes()

getIncludes() : string

Get the Includes text

Returns

string

getConstants()

getConstants() : string

Get the Constants text

Returns

string

getFunctions()

getFunctions() : string

Get the Functions text

Returns

string

getLabels()

getLabels() : string

Get the Labels text

Returns

string

getMainFunction()

getMainFunction() : string

Get the main function text

Returns

string