JavaScript

Class Methods

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

encode(mixed pObject)

Serializes a php variable to a javascript variable
Usage: echo('pVar = ' . \Framework\HTML\JavaScript::encode($pVar));

encodeBool(bool bValue)

Serializes a boolean value

encodeNumber(number iNumber)

Serializes a number (float / int)

encodeString(string str)

Serializes a string

encodeNull()

Serializes a null value

encodeDate(string strDate)

Serializes a date

encodeArray(array arr)

Converts a php array to a javscript array

encodeObject(mixed pObject)

Serializes an object

decode(mixed str)

Decodes a JSON string to a php array

combineStr()

Combines code from all parameters passed to this function

encodeJSString(mixed str)

__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