|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| YAHOO_util_Loader ($yuiVersion, $cacheKey=null, $modules=null, $noYUI=false) | |
| updateCache () | |
| load () | |
| setProcessedModuleType ($moduleType='ALL') | |
| hasProcessedModuleType ($moduleType='ALL') | |
| setLoaded () | |
| skinSetup ($name) | |
| parseSkin ($moduleName) | |
| formatSkin ($skin, $moduleName) | |
| loadSingle ($name) | |
| script () | |
| css () | |
| tags ($moduleType=null, $skipSort=false) | |
| script_embed () | |
| css_embed () | |
| embed ($moduleType=null, $skipSort=false) | |
| script_data () | |
| css_data () | |
| data ($moduleType=null, $allowRollups=false, $skipSort=false) | |
| script_json () | |
| css_json () | |
| json ($moduleType=null, $allowRollups=false, $skipSort=false, $full=false) | |
| script_raw () | |
| css_raw () | |
| raw ($moduleType=null, $allowRollups=false, $skipSort=false) | |
| log ($msg) | |
| accountFor ($name) | |
| prune ($deps, $moduleType) | |
| getSuperceded ($name) | |
| getAllDependencies ($mname, $loadOptional=false, $completed=array()) | |
| getGlobalDependencies () | |
| moduleSatisfies ($satisfied, $satisfier) | |
| overrideBase ($base, $modules) | |
| listSatisfies ($satisfied, $moduleList) | |
| checkThreshold ($module, $moduleList) | |
| sortDependencies ($moduleType, $skipSort=false) | |
| mapSatisfyingModule ($satisfied, $satisfier) | |
| processDependencies ($outputType, $moduleType, $skipSort=false, $showLoaded=false) | |
| getUrl ($name) | |
| getRemoteContent ($url) | |
| getRaw ($name) | |
| getContent ($name, $type) | |
| getLink ($name, $type) | |
| getComboLink ($type) | |
| clearComboLink ($type) | |
| addToCombo ($name, $type) | |
| canJSON () | |
| getProvides ($name) | |
| getLoadedModules () | |
| getLoadedModulesAsJSON () | |
Data Fields | |
| $base = "" | |
| $filter = "" | |
| $filters = array() | |
| $filterList = null | |
| $allowRollups = true | |
| $loadOptional = false | |
| $rollupsToTop = false | |
| $processedModuleTypes = array() | |
| $requests = array() | |
| $loaded = array() | |
| $superceded = array() | |
| $undefined = array() | |
| $dirty = true | |
| $sorted = null | |
| $accountedFor = array() | |
| $skins = array() | |
| $modules = array() | |
| $fullCacheKey = null | |
| $baseOverrides = array() | |
| $cacheFound = false | |
| $delayCache = false | |
| $version = null | |
| $versionKey = "_yuiversion" | |
| $skin = array() | |
| $rollupModules = array() | |
| $globalModules = array() | |
| $satisfactionMap = array() | |
| $depCache = array() | |
| $combine = false | |
| $comboBase = "http://yui.yahooapis.com/combo?" | |
| $cssComboLocation = null | |
| $jsComboLocation = null | |
The YUI PHP loader base class which provides dynamic server-side loading for YUI
Definition at line 59 of file loader.php.
| accountFor | ( | $ | name | ) |
Markes a module as being accounted for. Used in dependency testing. accountFor
| {string} | name Module to mark as being accounted for |
Definition at line 796 of file loader.php.


| addToCombo | ( | $ | name, |
| $ | type | ||
| ) |
Adds a module the combo collection for a specified resource type addToCombo
| {string} | name The module name to add |
| {string} | type Resource type (i.e.) YUI_JS or YUI_CSS |
Definition at line 1563 of file loader.php.

| canJSON | ( | ) |
Detects if environment supports JSON encode/decode canJSON
Definition at line 1589 of file loader.php.

| checkThreshold | ( | $ | module, |
| $ | moduleList | ||
| ) |
Determine if rollup replacement threshold has been met checkThreshold
| {string} | Module name |
| {array} | moduleList List of modules names |
Definition at line 1029 of file loader.php.

| clearComboLink | ( | $ | type | ) |
Clears the combo url of already loaded modules for a specific resource type. Prevents duplicate loading of modules if the page makes multiple calls to tags, css, or script. clearComboLink
| {string} | type Resource type (i.e.) YUI_JS or YUI_CSS |
Definition at line 1546 of file loader.php.

| css | ( | ) |
Used to output each of the required link tags css
Definition at line 630 of file loader.php.

| css_data | ( | ) |
Used to fetch an array of the required CSS components css_data
Definition at line 688 of file loader.php.

| css_embed | ( | ) |
Used to embed the raw CSS css_embed
Definition at line 659 of file loader.php.

| css_json | ( | ) |
Used to fetch a JSON object with the required CSS components css_json
Definition at line 724 of file loader.php.

| css_raw | ( | ) |
Used to produce the raw CSS code inline without the actual style tags css_raw
Definition at line 766 of file loader.php.

| data | ( | $ | moduleType = null, |
| $ | allowRollups = false, |
||
| $ | skipSort = false |
||
| ) |
Used to output an Array which contains data about the required JavaScript & CSS components data
| {string} | moduleType Type of html tag to return (i.e.) js or css. Default is both. |
| {boolean} | allowRollups |
| {boolean} | skipSort |
Definition at line 700 of file loader.php.


| embed | ( | $ | moduleType = null, |
| $ | skipSort = false |
||
| ) |
Used to output each of the required html tags inline (i.e.) script and/or style embed
| {string} | moduleType Type of html tag to return (i.e.) js or css. Default is both. |
| {boolean} | skipSort |
Definition at line 670 of file loader.php.


| formatSkin | ( | $ | skin, |
| $ | moduleName | ||
| ) |
Add prefix to module skin formatSkin
| string | $skin | the skin name |
| string | $moduleName | the name of a module |
Definition at line 576 of file loader.php.

| getAllDependencies | ( | $ | mname, |
| $ | loadOptional = false, |
||
| $ | completed = array() |
||
| ) |
Identify dependencies for a give module name getAllDependencies
| {string} | mname Module name |
| {boolean} | loadOptional Load optional dependencies |
| {array} | completed |
Definition at line 873 of file loader.php.


| getComboLink | ( | $ | type | ) |
Retrieves the combo link or script include for the currently loaded modules of a specific resource type getComboLink
| {string} | type Resource type (i.e.) YUI_JS or YUI_CSS |
Definition at line 1507 of file loader.php.

| getContent | ( | $ | name, |
| $ | type | ||
| ) |
Retrieve the style or script node with embedded source for a given module name and resource type getContent
| {string} | name The module name to fetch the source from |
| {string} | type Resource type (i.e.) YUI_JS or YUI_CSS |
Definition at line 1466 of file loader.php.


| getLink | ( | $ | name, |
| $ | type | ||
| ) |
Retrieve the link or script include for a given module name and resource type getLink
| {string} | name The module name to fetch the include for |
| {string} | type Resource type (i.e.) YUI_JS or YUI_CSS |
Definition at line 1489 of file loader.php.


| getLoadedModules | ( | ) |
Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method getLoadedModules
Definition at line 1618 of file loader.php.


Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method getLoadedModulesAsJSON
Definition at line 1639 of file loader.php.

| getProvides | ( | $ | name | ) |
Identifies what module(s) are provided by a given module name (e.g.) yaho-dom-event provides yahoo, dom, and event getProvides
| {string} | name Module name |
Definition at line 1599 of file loader.php.

| getRaw | ( | $ | name | ) |
Retrieve the raw source contents for a given module name getRaw
| {string} | name The module name you wish to fetch the source from |
Definition at line 1450 of file loader.php.


| getRemoteContent | ( | $ | url | ) |
Retrieve the contents of a remote resource getRemoteContent
| {string} | url URL to fetch data from |
Definition at line 1407 of file loader.php.

| getSuperceded | ( | $ | name | ) |
Use to get a list of modules superseded by the given module name getSuperceded
| {string} | name Module name |
Definition at line 837 of file loader.php.

| getUrl | ( | $ | name | ) |
Retrieve the calculated url for the component in question getUrl
| {string} | name YUI component name |
Definition at line 1365 of file loader.php.

| hasProcessedModuleType | ( | $ | moduleType = 'ALL' | ) |
Used to determine if a module type has been processed hasProcessedModuleType
| string | $moduleType |
Definition at line 467 of file loader.php.
| json | ( | $ | moduleType = null, |
| $ | allowRollups = false, |
||
| $ | skipSort = false, |
||
| $ | full = false |
||
| ) |
Used to fetch a JSON object with the required JavaScript and CSS components json
| {string} | moduleType |
| {boolean} | allowRollups |
| {boolean} | skipSort |
| {boolean} | full |
Definition at line 737 of file loader.php.


| listSatisfies | ( | $ | satisfied, |
| $ | moduleList | ||
| ) |
Used to determine if one module is satisfied by provided array of modules listSatisfies
| {string} | satisfied Module name |
| {array} | moduleList List of modules names |
Definition at line 1005 of file loader.php.

| load | ( | ) |
Used to load YUI and/or custom components load
| string | $varname | [, string $... ] List of component names |
Definition at line 445 of file loader.php.

| loadSingle | ( | $ | name | ) |
Loads the requested module loadSingle
| string | $name | the name of a module to load |
Definition at line 592 of file loader.php.


| log | ( | $ | msg | ) |
General logging function. Writes a message to the PHP error log. log
| {string} | msg Message to write |
Definition at line 787 of file loader.php.
| mapSatisfyingModule | ( | $ | satisfied, |
| $ | satisfier | ||
| ) |
| moduleSatisfies | ( | $ | satisfied, |
| $ | satisfier | ||
| ) |
Returns true if the supplied $satisfied module is satisfied by the supplied $satisfier module
Definition at line 973 of file loader.php.

| overrideBase | ( | $ | base, |
| $ | modules | ||
| ) |
Used to override the base dir for specific set of modules (Note: not supported when using the combo service) overrideBase
| {string} | base Base path (e.g.) 2.6.0/build |
| {array} | modules Module names of which to override base |
Definition at line 992 of file loader.php.
| parseSkin | ( | $ | moduleName | ) |
Parses a module's skin. A modules skin is typically prefixed. parseSkin
| string | $name | the name of a module to parse |
Definition at line 561 of file loader.php.

| processDependencies | ( | $ | outputType, |
| $ | moduleType, | ||
| $ | skipSort = false, |
||
| $ | showLoaded = false |
||
| ) |
Used to process the dependency list and retrieve the actual CSS and/or JavaScript resources in requested output format (e.g.) json, link/script nodes, embeddable code, php array, etc. processDependencies
| {string} | outputType the format you like the response to be in |
| {string} | moduleType Type of module to return (i.e.) js or css |
| {boolean} | skipSort |
| {boolean} | showLoaded |
Definition at line 1260 of file loader.php.


| prune | ( | $ | deps, |
| $ | moduleType | ||
| ) |
Used during dependecy processing to prune modules from the list of modules requiring further processing prune
| {array} | deps List of module dependencies |
| {string} | moduleType Type of modules to prune (i.e.) js or css |
Definition at line 816 of file loader.php.

| raw | ( | $ | moduleType = null, |
| $ | allowRollups = false, |
||
| $ | skipSort = false |
||
| ) |
Used to produce the raw Javacript and CSS code inline without the actual script or style tags raw
| {string} | moduleType |
| {boolean} | allowRollups |
| {boolean} | skipSort |
Definition at line 778 of file loader.php.


| script | ( | ) |
Used to output each of the required script tags script
Definition at line 621 of file loader.php.

| script_data | ( | ) |
Used to fetch an array of the required JavaScript components script_data
Definition at line 679 of file loader.php.

| script_embed | ( | ) |
Used to embed the raw JavaScript inline script_embed
Definition at line 650 of file loader.php.

| script_json | ( | ) |
Used to fetch a JSON object with the required JavaScript components script_json
Definition at line 715 of file loader.php.

| script_raw | ( | ) |
Used to produce the raw JavaScript code inline without the actual script tags script_raw
Definition at line 757 of file loader.php.

| setLoaded | ( | ) |
Used to specify modules that are already on the page that should not be loaded again setLoaded
| string | $varname | [, string $... ] List of module names |
Definition at line 476 of file loader.php.

| setProcessedModuleType | ( | $ | moduleType = 'ALL' | ) |
Used to mark a module type as processed setProcessedModuleType
| string | $moduleType |
Definition at line 458 of file loader.php.

| skinSetup | ( | $ | name | ) |
Sets up skin for skinnable modules skinSetup
| string | $name | module name |
Definition at line 505 of file loader.php.


| sortDependencies | ( | $ | moduleType, |
| $ | skipSort = false |
||
| ) |
Used to sort dependencies in the proper order (Note: only call this if the loader is dirty) sortDependencies
| {string} | Module name |
| {array} | moduleList List of modules names |
Definition at line 1052 of file loader.php.


| tags | ( | $ | moduleType = null, |
| $ | skipSort = false |
||
| ) |
Used to output each of the required html tags (i.e.) script or link tags
| {string} | moduleType Type of html tag to return (i.e.) js or css. Default is both. |
| {boolean} | skipSort |
Definition at line 641 of file loader.php.


| updateCache | ( | ) |
Used to update the APC cache updateCache
Definition at line 426 of file loader.php.

| YAHOO_util_Loader | ( | $ | yuiVersion, |
| $ | cacheKey = null, |
||
| $ | modules = null, |
||
| $ | noYUI = false |
||
| ) |
The YAHOO_util_Loader class constructor
| {string} | yuiVersion Defines which version of YUI metadata to load |
| {string} | cacheKey Unique APC cache key. This is combined with the YUI base so that updates to YUI will force a new cache entry. However, if your custom config changes, this key should be changed (otherwise the old values will be used until the cache expires). |
| {array} | modules A list of custom modules |
| {boolean} | noYUI Pass true if you do not want the YUI metadata |
Definition at line 330 of file loader.php.

| $accountedFor = array() |
Definition at line 185 of file loader.php.
| $allowRollups = true |
Definition at line 103 of file loader.php.
| $base = "" |
Definition at line 67 of file loader.php.
| $baseOverrides = array() |
Definition at line 217 of file loader.php.
| $cacheFound = false |
Definition at line 225 of file loader.php.
| $combine = false |
Definition at line 288 of file loader.php.
| $comboBase = "http://yui.yahooapis.com/combo?" |
Definition at line 298 of file loader.php.
| $cssComboLocation = null |
Definition at line 308 of file loader.php.
| $delayCache = false |
Definition at line 233 of file loader.php.
| $depCache = array() |
Definition at line 279 of file loader.php.
| $dirty = true |
Definition at line 169 of file loader.php.
| $filter = "" |
Definition at line 78 of file loader.php.
| $filterList = null |
Definition at line 95 of file loader.php.
| $filters = array() |
Definition at line 86 of file loader.php.
| $fullCacheKey = null |
Definition at line 209 of file loader.php.
| $globalModules = array() |
Definition at line 265 of file loader.php.
| $jsComboLocation = null |
Definition at line 318 of file loader.php.
| $loaded = array() |
Definition at line 145 of file loader.php.
| $loadOptional = false |
Definition at line 111 of file loader.php.
| $modules = array() |
Definition at line 201 of file loader.php.
| $processedModuleTypes = array() |
Definition at line 129 of file loader.php.
| $requests = array() |
Definition at line 137 of file loader.php.
| $rollupModules = array() |
Definition at line 257 of file loader.php.
| $rollupsToTop = false |
Definition at line 120 of file loader.php.
| $satisfactionMap = array() |
Definition at line 272 of file loader.php.
| $skin = array() |
Definition at line 250 of file loader.php.
| $skins = array() |
Definition at line 193 of file loader.php.
| $sorted = null |
Definition at line 177 of file loader.php.
| $superceded = array() |
Definition at line 153 of file loader.php.
| $undefined = array() |
Definition at line 161 of file loader.php.
| $version = null |
Definition at line 242 of file loader.php.
| $versionKey = "_yuiversion" |
Definition at line 243 of file loader.php.