sJavascriptURI>. */ var $bInlineScript; var $aScripts = array(); var $aImages = array(); var $aStyles = array(); /* Function: clsTableUpdater Constructs and initializes an instance of the table updater class. */ function clsPreloader() { $this->sDefer = ''; $this->sJavascriptURI = ''; $this->bInlineScript = false; } /* Function: configure Receives configuration settings set by or user script calls to configure>. sName - (string): The name of the configuration option being set. mValue - (mixed): The value being associated with the configuration option. */ function configure($sName, $mValue) { if ('scriptDeferral' == $sName) { if (true === $mValue || false === $mValue) { if ($mValue) $this->sDefer = 'defer '; else $this->sDefer = ''; } } else if ('javascript URI' == $sName) { $this->sJavascriptURI = $mValue; } else if ('inlineScript' == $sName) { if (true === $mValue || false === $mValue) $this->bInlineScript = $mValue; } } /* Function: generateClientScript Called by the during the script generation phase. This will either inline the script or insert a script tag which references the file based on the value of the bInlineScript> configuration option. */ function generateClientScript() { if ($this->bInlineScript) { echo "\n\n"; } else { echo "\n\n"; echo "\n"; } } function addScript($uri) { $this->aScripts[] = $uri; } function addImages($uri) { $this->aImages[] = $uri; } function addStyleSheet($uri) { $this->aStyles[] = $uri; } } $objPluginManager =& xajaxPluginManager::getInstance(); $objPluginManager->registerPlugin(new clsPreloader());