MediaWiki
master
|
Load extension manifests and then aggregate their contents. More...
Public Member Functions | |
extractInfo ( $path, array $info, $version) | |
extractInfoFromFile (string $path) | |
Extracts extension info from the given JSON file. More... | |
getExtraAutoloaderPaths ( $dir, array $info) | |
getExtractedAutoloadInfo (bool $includeDev=false) | |
Returns the extracted autoload info. More... | |
getExtractedInfo (bool $includeDev=false) | |
getRequirements (array $info, $includeDev) | |
Get the requirements for the provided info. More... | |
![]() | |
getExtractedInfo () | |
Protected Member Functions | |
extractAttributes ( $path, array $info) | |
extractConfig1 (array $info) | |
Set configuration settings for manifest_version == 1. More... | |
extractConfig2 (array $info, $dir) | |
Set configuration settings for manifest_version == 2. More... | |
extractCredits ( $path, array $info) | |
extractExtensionMessagesFiles ( $dir, array $info) | |
extractForeignResourcesDir (array $info, string $name, string $dir) | |
extractHooks (array $info, string $path) | |
Extract hook information from Hooks and HookHandler attributes. More... | |
extractImplicitRights (array $info) | |
Extract any user rights that should be granted implicitly. More... | |
extractMessagesDirs ( $dir, array $info) | |
Set message-related settings, which need to be expanded to use absolute paths. More... | |
extractNamespaces (array $info) | |
Register namespaces with the appropriate global settings. More... | |
extractPathBasedGlobal ( $global, $dir, $paths) | |
extractResourceLoaderModules ( $dir, array $info) | |
extractSkinImportPaths ( $dir, array $info) | |
extractSkins ( $dir, array $info) | |
Extract skins and handle path correction for templateDirectory. More... | |
storeToArray ( $path, $name, $value, &$array) | |
Stores $value to $array; using array_merge() if $array already contains $name. More... | |
storeToArrayRecursive ( $path, $name, $value, &$array) | |
Stores $value to $array; using array_merge_recursive() if $array already contains $name. More... | |
Protected Attributes | |
array | $attributes = [] |
Anything else in the $info that hasn't already been processed. More... | |
string[][] | $autoload |
Autoloader information. More... | |
string[][] | $autoloadDev |
Autoloader information for development. More... | |
callable[] | $callbacks = [] |
Things to be called once the registration of these extensions is done. More... | |
array | $credits = [] |
array | $defines = [] |
Things that should be define()'d. More... | |
array | $extAttributes = [] |
Extension attributes, keyed by name => settings. More... | |
array | $globals |
Stuff that is going to be set to $GLOBALS. More... | |
Static Protected Attributes | |
static array | $globalSettings |
Keys that should be set to $GLOBALS. More... | |
Load extension manifests and then aggregate their contents.
Definition at line 12 of file ExtensionProcessor.php.
|
protected |
string | $path | |
array | $info |
Definition at line 336 of file ExtensionProcessor.php.
References $path, and storeToArrayRecursive().
Referenced by extractInfo().
|
protected |
Set configuration settings for manifest_version == 1.
array | $info |
Definition at line 794 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Set configuration settings for manifest_version == 2.
array | $info | |
string | $dir |
Definition at line 834 of file ExtensionProcessor.php.
References ExtensionRegistry\MERGE_STRATEGY.
Referenced by extractInfo().
|
protected |
string | $path | |
array | $info |
Exception |
Definition at line 753 of file ExtensionProcessor.php.
References $credits, and $path.
Referenced by extractInfo().
|
protected |
Definition at line 667 of file ExtensionProcessor.php.
References $file.
Referenced by extractInfo().
|
protected |
Definition at line 779 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Extract hook information from Hooks and HookHandler attributes.
Store hook in $wgHooks if a legacy style handler or the 'Hooks' attribute if a non-legacy handler
array | $info | attributes and associated values from extension.json |
string | $path | path to extension.json |
Definition at line 530 of file ExtensionProcessor.php.
References $path.
Referenced by extractInfo().
|
protected |
Extract any user rights that should be granted implicitly.
array | $info |
Definition at line 716 of file ExtensionProcessor.php.
Referenced by extractInfo().
ExtensionProcessor::extractInfo | ( | $path, | |
array | $info, | ||
$version | |||
) |
string | $path | |
array | $info | |
int | $version | manifest_version for info |
Implements Processor.
Definition at line 252 of file ExtensionProcessor.php.
References $path, extractAttributes(), extractConfig1(), extractConfig2(), extractCredits(), extractExtensionMessagesFiles(), extractForeignResourcesDir(), extractHooks(), extractImplicitRights(), extractMessagesDirs(), extractNamespaces(), extractPathBasedGlobal(), extractResourceLoaderModules(), extractSkinImportPaths(), extractSkins(), storeToArray(), and storeToArrayRecursive().
Referenced by extractInfoFromFile().
ExtensionProcessor::extractInfoFromFile | ( | string | $path | ) |
Extracts extension info from the given JSON file.
string | $path |
Definition at line 236 of file ExtensionProcessor.php.
References $path, and extractInfo().
|
protected |
Set message-related settings, which need to be expanded to use absolute paths.
string | $dir | |
array | $info |
Definition at line 683 of file ExtensionProcessor.php.
References $file.
Referenced by extractInfo().
|
protected |
Register namespaces with the appropriate global settings.
array | $info |
Definition at line 564 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Definition at line 878 of file ExtensionProcessor.php.
References $path.
Referenced by extractInfo().
|
protected |
Definition at line 608 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
string | $dir | |
array | $info |
Definition at line 739 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Extract skins and handle path correction for templateDirectory.
string | $dir | |
array | $info |
Definition at line 699 of file ExtensionProcessor.php.
Referenced by extractInfo().
ExtensionProcessor::getExtraAutoloaderPaths | ( | $dir, | |
array | $info | ||
) |
string | $dir | |
array | $info |
Implements Processor.
Definition at line 932 of file ExtensionProcessor.php.
References wfDeprecated().
ExtensionProcessor::getExtractedAutoloadInfo | ( | bool | $includeDev = false | ) |
Returns the extracted autoload info.
The autoload info is returned as an associative array with three keys:
bool | $includeDev |
Implements Processor.
Definition at line 955 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
ExtensionProcessor::getExtractedInfo | ( | bool | $includeDev = false | ) |
Definition at line 344 of file ExtensionProcessor.php.
References $attributes, $autoload, $callbacks, $credits, $defines, $globals, getExtractedAutoloadInfo(), ExtensionRegistry\MERGE_STRATEGY, and storeToArrayRecursive().
ExtensionProcessor::getRequirements | ( | array | $info, |
$includeDev | |||
) |
Get the requirements for the provided info.
array | $info | |
bool | $includeDev |
Implements Processor.
Definition at line 381 of file ExtensionProcessor.php.
|
protected |
Stores $value to $array; using array_merge() if $array already contains $name.
string | $path | |
string | $name | |
array | $value | |
array | &$array |
InvalidArgumentException |
Definition at line 913 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Stores $value to $array; using array_merge_recursive() if $array already contains $name.
string | $path | |
string | $name | |
array | $value | |
array | &$array |
InvalidArgumentException |
Definition at line 893 of file ExtensionProcessor.php.
Referenced by extractAttributes(), extractInfo(), and getExtractedInfo().
|
protected |
Anything else in the $info that hasn't already been processed.
Definition at line 219 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Autoloader information.
Each element is an array of strings. 'files' is just a list, 'classes' and 'namespaces' are associative.
Definition at line 195 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Autoloader information for development.
Same structure as $autoload.
Definition at line 207 of file ExtensionProcessor.php.
|
protected |
Things to be called once the registration of these extensions is done.
Keyed by the name of the extension that it belongs to
Definition at line 181 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Definition at line 186 of file ExtensionProcessor.php.
Referenced by extractCredits(), and getExtractedInfo().
|
protected |
Things that should be define()'d.
Definition at line 172 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Extension attributes, keyed by name => settings.
Definition at line 227 of file ExtensionProcessor.php.
|
protected |
Stuff that is going to be set to $GLOBALS.
Some keys are pre-set to arrays, so we can += to them
Definition at line 162 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
staticprotected |
Keys that should be set to $GLOBALS.
Definition at line 19 of file ExtensionProcessor.php.