|
function getPages Context string[] | $context |
| Get list of pages used by this module.
|
|
array | $datas = [] |
| List of page names that contain JSON.
|
|
string null | $group |
| Group of module.
|
|
string | $origin = self::ORIGIN_USER_SITEWIDE |
| Origin defaults to users with sitewide authority.
|
|
array | $scripts = [] |
| List of page names that contain JavaScript.
|
|
array | $styles = [] |
| List of page names that contain CSS.
|
|
array | $titleInfo = [] |
| In-process cache for title info, structured as an array [ <batchKey> // Pipe-separated list of sorted keys from getPages => [ <titleKey> => [ // Normalised title key 'page_len' => .., 'page_latest' => .., 'page_touched' => .., ] ] ].
|
|
Config | $config |
|
array | $contents = [] |
| Map of (context hash => cached module content)
|
|
string bool | $deprecated = false |
| Deprecation string or true if deprecated; false otherwise.
|
|
array | $fileDeps = [] |
| Map of (variant => indirect file dependencies)
|
|
LoggerInterface | $logger |
|
array | $msgBlobs = [] |
| Map of (language => in-object cache for message blob)
|
|
string null | $name = null |
| Module name.
|
|
int | $origin = self::ORIGIN_CORE_SITEWIDE |
| Script and style modules form a hierarchy of trustworthiness, with core modules like skins and jQuery as most trustworthy, and user scripts as least trustworthy.
|
|
string[] null | $skins = null |
| Skin names.
|
|
string[] | $targets = [ 'desktop', 'mobile' ] |
| What client platforms the module targets (e.g.
|
|
array | $versionHash = [] |
| Map of (context hash => cached module version hash)
|
|
|
static | invalidateModuleCache (PageIdentity $page, ?RevisionRecord $old, ?RevisionRecord $new, string $domain) |
| Clear the preloadTitleInfo() cache for all wiki modules on this wiki on page change if it was a JS or CSS page.
|
|
static | preloadTitleInfo (Context $context, IDatabase $db, array $moduleNames) |
|
static | expandRelativePaths (array $filePaths) |
| Expand directories relative to $IP.
|
|
static | getRelativePaths (array $filePaths) |
| Make file paths relative to MediaWiki directory.
|
|
static | getVary (Context $context) |
| Get vary string.
|
|
| getContent ( $titleText, Context $context) |
|
| getContentObj (PageIdentity $page, Context $context, $maxRedirects=1) |
|
| getDB () |
| Get the Database handle used for computing the module version.
|
|
| getPages (Context $context) |
| Subclasses should return an associative array of resources in the module.
|
|
| getRequireKey (string $titleText) |
| Convert a namespace-formatted page title to a virtual package file name.
|
|
| getTitleInfo (Context $context) |
| Get the information about the wiki pages for a given context.
|
|
| isPackaged () |
| Get whether this module is a packaged module.
|
|
| buildContent (Context $context) |
| Bundle all resources attached to this module into an array.
|
|
| getFileDependencies (Context $context) |
| Get the indirect dependencies for this module pursuant to the skin/language context.
|
|
| getHookRunner () |
| Get a HookRunner for running core hooks.
|
|
| getLessVars (Context $context) |
| Get module-specific LESS variables, if any.
|
|
| getLogger () |
|
| getMessageBlob (Context $context) |
| Get the hash of the message blob.
|
|
| getPreloadLinks (Context $context) |
| Get a list of resources that web browsers may preload.
|
|
| saveFileDependencies (Context $context, array $curFileRefs) |
| Save the indirect dependencies for this module pursuant to the skin/language context.
|
|
| validateScriptFile ( $fileName, $contents) |
| Validate a user-provided JavaScript blob.
|
|
static | fetchTitleInfo (IReadableDatabase $db, array $pages, $fname=__METHOD__) |
|
static | safeFileHash ( $filePath) |
| Compute a non-cryptographic string hash of a file's contents.
|
|
Module for site customizations.
- Access: internal
Definition at line 33 of file SiteModule.php.