MediaWiki
REL1_24
|
Public Member Functions | |
getGroup () | |
getModifiedHash (ResourceLoaderContext $context) | |
Hash of all dynamic data embedded in getScript(). | |
getModifiedTime (ResourceLoaderContext $context) | |
getModuleRegistrations (ResourceLoaderContext $context) | |
Get registration code for all modules. | |
getScript (ResourceLoaderContext $context) | |
isRaw () | |
supportsURLLoading () | |
Static Public Member Functions | |
static | compileUnresolvedDependencies (array &$registryData) |
Optimize the dependency tree in $this->modules and return it. | |
static | getStartupModules () |
Base modules required for the the base environment of ResourceLoader. | |
static | getStartupModulesUrl (ResourceLoaderContext $context) |
Get the load URL of the startup modules. | |
Protected Member Functions | |
getConfigSettings ($context) | |
Static Protected Member Functions | |
static | getImplicitDependencies (array $registryData, $moduleName) |
Recursively get all explicit and implicit dependencies for to the given module. | |
Protected Attributes | |
$configVars = array() | |
$modifiedTime = array() | |
$targets = array( 'desktop', 'mobile' ) |
Definition at line 25 of file ResourceLoaderStartUpModule.php.
static ResourceLoaderStartUpModule::compileUnresolvedDependencies | ( | array &$ | registryData | ) | [static] |
Optimize the dependency tree in $this->modules and return it.
The optimization basically works like this: Given we have module A with the dependencies B and C and module B with the dependency C. Now we don't have to tell the client to explicitly fetch module C as that's already included in module B.
This way we can reasonably reduce the amout of module registration data send to the client.
array | &$registryData | Modules keyed by name with properties:
|
Definition at line 171 of file ResourceLoaderStartUpModule.php.
References ResourceLoaderModule\$name, as, and getImplicitDependencies().
Referenced by getModuleRegistrations().
ResourceLoaderStartUpModule::getConfigSettings | ( | $ | context | ) | [protected] |
ResourceLoaderContext | $context |
Definition at line 39 of file ResourceLoaderStartUpModule.php.
References ResourceLoaderModule\$name, $vars, $wgContLang, array(), as, Title\convertByteClassToUnicodeClass(), MWNamespace\getCanonicalNamespaces(), ResourceLoaderModule\getConfig(), MWNamespace\getContentNamespaces(), Skin\getSkinNames(), global, MWNamespace\isCapitalized(), Title\legalChars(), Title\newMainPage(), object, SpecialUpload\rotationEnabled(), wfRunHooks(), wfScript(), and wfUrlProtocols().
Referenced by getModifiedHash(), and getScript().
Reimplemented from ResourceLoaderModule.
Definition at line 476 of file ResourceLoaderStartUpModule.php.
static ResourceLoaderStartUpModule::getImplicitDependencies | ( | array $ | registryData, |
$ | moduleName | ||
) | [static, protected] |
Recursively get all explicit and implicit dependencies for to the given module.
array | $registryData | |
string | $moduleName |
Definition at line 125 of file ResourceLoaderStartUpModule.php.
Referenced by compileUnresolvedDependencies().
Hash of all dynamic data embedded in getScript().
Detect changes to mw.config settings embedded in getScript (bug 28899).
ResourceLoaderContext | $context |
Reimplemented from ResourceLoaderModule.
Definition at line 464 of file ResourceLoaderStartUpModule.php.
References array(), ResourceLoaderModule\getConfig(), and getConfigSettings().
ResourceLoaderContext | $context |
Reimplemented from ResourceLoaderModule.
Definition at line 421 of file ResourceLoaderStartUpModule.php.
References $IP, ResourceLoaderModule\$name, $time, as, ResourceLoaderModule\getConfig(), ResourceLoaderContext\getHash(), ResourceLoaderModule\getHashMtime(), ResourceLoaderContext\getResourceLoader(), global, and wfTimestamp().
Get registration code for all modules.
ResourceLoaderContext | $context |
Definition at line 193 of file ResourceLoaderStartUpModule.php.
References ResourceLoaderModule\$name, $out, $resourceLoader, array(), as, compileUnresolvedDependencies(), ResourceLoaderModule\getConfig(), ResourceLoaderContext\getRequest(), ResourceLoaderContext\getResourceLoader(), ResourceLoader\inDebugMode(), ResourceLoader\makeCustomLoaderScript(), ResourceLoader\makeLoaderRegisterScript(), ResourceLoader\makeLoaderSourcesScript(), wfProfileIn(), wfProfileOut(), and wfTimestamp().
Referenced by getScript().
ResourceLoaderContext | $context |
Reimplemented from ResourceLoaderModule.
Definition at line 382 of file ResourceLoaderStartUpModule.php.
References $IP, $out, array(), Xml\encodeJsCall(), ResourceLoaderModule\getConfig(), getConfigSettings(), getModuleRegistrations(), ResourceLoaderContext\getOnly(), global, and Html\linkedScript().
static ResourceLoaderStartUpModule::getStartupModules | ( | ) | [static] |
Base modules required for the the base environment of ResourceLoader.
Definition at line 340 of file ResourceLoaderStartUpModule.php.
References array().
Referenced by getStartupModulesUrl().
static ResourceLoaderStartUpModule::getStartupModulesUrl | ( | ResourceLoaderContext $ | context | ) | [static] |
Get the load URL of the startup modules.
This is a helper for getScript(), but can also be called standalone, such as when generating an AppCache manifest.
ResourceLoaderContext | $context |
Definition at line 353 of file ResourceLoaderStartUpModule.php.
References $query, array(), as, ResourceLoaderContext\getDebug(), ResourceLoaderContext\getLanguage(), ResourceLoaderContext\getResourceLoader(), ResourceLoaderContext\getSkin(), getStartupModules(), ResourceLoader\makePackedModulesString(), wfAppendQuery(), wfScript(), and wfTimestamp().
Reimplemented from ResourceLoaderModule.
Definition at line 331 of file ResourceLoaderStartUpModule.php.
Reimplemented from ResourceLoaderModule.
Definition at line 413 of file ResourceLoaderStartUpModule.php.
ResourceLoaderStartUpModule::$configVars = array() [protected] |
Definition at line 30 of file ResourceLoaderStartUpModule.php.
ResourceLoaderStartUpModule::$modifiedTime = array() [protected] |
Definition at line 29 of file ResourceLoaderStartUpModule.php.
ResourceLoaderStartUpModule::$targets = array( 'desktop', 'mobile' ) [protected] |
Reimplemented from ResourceLoaderModule.
Definition at line 31 of file ResourceLoaderStartUpModule.php.