JavaScript Manager

Facilitates the inclusion of javascript files

Class Methods

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

getCacheKey()

send(string strFile)

Includes a js file

blockBegin()

Begins a script block

blockEnd()

Ends a script block

getCommonScript(mixed strFileName)

Gets the URL for a common script

includeCommon(string strFileName)

Includes a common libarary

includeJQuery(mixed bHead)

Includes the jQuery JavaScript framework

includeJQueryUI()

Includes the jQuery UI JavaScript framework

includeJQueryPlugin(string strPluginName)

Include a jQuery/jQuery UI based plugin

includeAjax()

blockBeginBody()

Begins a block to be executed at the end of the page

blockEndBody()

Begins a jQuery block to be executed onDomReady

blockGetJQDOMReady()

handlerBody(mixed strURLAppend)

renderAJAX()

getJSPartsForFiles(array arrFiles)

Returns the parts of a set of JS files

renderIds(mixed iJSId, int iCSSId)

Renders JS and CSS ids to register them on the client

pushDocumentEntity()

To be overridden

popDocumentEntity(mixed arrJS)

To be overridden

includeHead(string strFile)

Includes a file before the </head> tag

includeBody(string strFile)

Includes a file before the </body> tag

getIncludedHead()

getIncludedBody()

getIncludedAll()

blockBeginHead()

Begins a new block to be injected before </head>

blockEndHead()

Ends the block

blockBeginBody()

Begins a new block to be injected before </body>

blockEndBody()

Ends the block

blockEndBodyPrepend()

Ends the block, but injects at the beginning of the body close block

registerHeadHandler()

registerBodyHandler()

handlerHead(mixed strURLAppend)

generateId(mixed arrAssets)

Generates a resource id for the batch of managed resources

prepareURLForAssets(mixed arrAssets)

Sends all managed resources to the client

setHeadSent()

setBodySent()

pushDocument()

Pushes the state of the asset manager

popDocument()

Pops the state of the asset manager

__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