MediaWiki fundraising/REL1_35
|
Public Member Functions | |
extractInfo ( $path, array $info, $version) | |
getExtraAutoloaderPaths ( $dir, array $info) | |
Get the path for additional autoloaders, e.g. | |
getExtractedInfo () | |
getRequirements (array $info, $includeDev) | |
Get the requirements for the provided info. | |
Protected Member Functions | |
extractAttributes ( $path, array $info) | |
extractConfig1 (array $info) | |
Set configuration settings for manifest_version == 1. | |
extractConfig2 (array $info, $dir) | |
Set configuration settings for manifest_version == 2. | |
extractCredits ( $path, array $info) | |
extractExtensionMessagesFiles ( $dir, array $info) | |
extractHooks (array $info, string $path) | |
Extract hook information from Hooks and HookHandler attributes. | |
extractMessagesDirs ( $dir, array $info) | |
Set message-related settings, which need to be expanded to use absolute paths. | |
extractNamespaces (array $info) | |
Register namespaces with the appropriate global settings. | |
extractPathBasedGlobal ( $global, $dir, $paths) | |
extractResourceLoaderModules ( $dir, array $info) | |
storeToArray ( $path, $name, $value, &$array) | |
Stores $value to $array; using array_merge() if $array already contains $name. | |
storeToArrayRecursive ( $path, $name, $value, &$array) | |
Stores $value to $array; using array_merge_recursive() if $array already contains $name. | |
Protected Attributes | |
array | $attributes = [] |
Any thing else in the $info that hasn't already been processed. | |
callable[] | $callbacks = [] |
Things to be called once registration of these extensions are done keyed by the name of the extension that it belongs to. | |
array | $config = [] |
array | $credits = [] |
array | $defines = [] |
Things that should be define()'d. | |
array | $extAttributes = [] |
Extension attributes, keyed by name => settings. | |
array | $globals |
Stuff that is going to be set to $GLOBALS. | |
Static Protected Attributes | |
static array | $globalSettings |
Keys that should be set to $GLOBALS. | |
Private Member Functions | |
addConfigGlobal ( $key, $value, $extName) | |
Helper function to set a value to a specific global, if it isn't set already. | |
setArrayHookHandler (array $callback, array $hookHandlersAttr, string $name, string $path) | |
When handler value is an array, set $wgHooks or Hooks attribute Could be legacy hook e.g. | |
setStringHookHandler (string $callback, array $hookHandlersAttr, string $name, string $path) | |
When handler value is a string, set $wgHooks or Hooks attribute. | |
Definition at line 3 of file ExtensionProcessor.php.
|
private |
Helper function to set a value to a specific global, if it isn't set already.
string | $key | The config key with the prefix and anything |
mixed | $value | The value of the config |
string | $extName | Name of the extension |
Definition at line 728 of file ExtensionProcessor.php.
Referenced by extractConfig1(), and extractConfig2().
|
protected |
string | $path | |
array | $info |
Definition at line 282 of file ExtensionProcessor.php.
References $path, and storeToArrayRecursive().
Referenced by extractInfo().
|
protected |
Set configuration settings for manifest_version == 1.
array | $info |
Definition at line 670 of file ExtensionProcessor.php.
References addConfigGlobal().
Referenced by extractInfo().
|
protected |
Set configuration settings for manifest_version == 2.
array | $info | |
string | $dir |
Definition at line 693 of file ExtensionProcessor.php.
References addConfigGlobal().
Referenced by extractInfo().
|
protected |
string | $path | |
array | $info |
Exception |
Definition at line 638 of file ExtensionProcessor.php.
References $credits, and $path.
Referenced by extractInfo().
|
protected |
Definition at line 606 of file ExtensionProcessor.php.
References $file.
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 473 of file ExtensionProcessor.php.
References $path, setArrayHookHandler(), and setStringHookHandler().
Referenced by extractInfo().
ExtensionProcessor::extractInfo | ( | $path, | |
array | $info, | ||
$version ) |
string | $path | |
array | $info | |
int | $version | manifest_version for info |
Implements Processor.
Definition at line 198 of file ExtensionProcessor.php.
References $path, extractAttributes(), extractConfig1(), extractConfig2(), extractCredits(), extractExtensionMessagesFiles(), extractHooks(), extractMessagesDirs(), extractNamespaces(), extractPathBasedGlobal(), extractResourceLoaderModules(), storeToArray(), and storeToArrayRecursive().
|
protected |
Set message-related settings, which need to be expanded to use absolute paths.
string | $dir | |
array | $info |
Definition at line 622 of file ExtensionProcessor.php.
References $file.
Referenced by extractInfo().
|
protected |
Register namespaces with the appropriate global settings.
array | $info |
Definition at line 507 of file ExtensionProcessor.php.
Referenced by extractInfo().
|
protected |
Definition at line 737 of file ExtensionProcessor.php.
References $path.
Referenced by extractInfo().
|
protected |
Definition at line 549 of file ExtensionProcessor.php.
References $basePath.
Referenced by extractInfo().
ExtensionProcessor::getExtraAutoloaderPaths | ( | $dir, | |
array | $info ) |
Get the path for additional autoloaders, e.g.
the one of Composer.
string | $dir | |
array | $info |
Implements Processor.
Definition at line 783 of file ExtensionProcessor.php.
ExtensionProcessor::getExtractedInfo | ( | ) |
Implements Processor.
Definition at line 290 of file ExtensionProcessor.php.
References $attributes, $callbacks, $config, $credits, $defines, $globals, and storeToArrayRecursive().
ExtensionProcessor::getRequirements | ( | array | $info, |
$includeDev ) |
Get the requirements for the provided info.
array | $info | |
bool | $includeDev |
Implements Processor.
Definition at line 324 of file ExtensionProcessor.php.
|
private |
When handler value is an array, set $wgHooks or Hooks attribute Could be legacy hook e.g.
'GlobalFunctionName' or non-legacy hook referencing a handler definition from 'HookHandler' attribute
array | $callback | Handler |
array | $hookHandlersAttr | handler definitions from 'HookHandler' attribute |
string | $name | |
string | $path | extension.json file path |
UnexpectedValueException |
Definition at line 406 of file ExtensionProcessor.php.
References $path, setArrayHookHandler(), and setStringHookHandler().
Referenced by extractHooks(), and setArrayHookHandler().
|
private |
When handler value is a string, set $wgHooks or Hooks attribute.
Could be legacy hook e.g. 'GlobalFunctionName' or non-legacy hook referencing a handler definition from 'HookHandler' attribute
string | $callback | Handler |
array | $hookHandlersAttr | handler definitions from 'HookHandler' attribute |
string | $name | |
string | $path |
Definition at line 448 of file ExtensionProcessor.php.
References $path.
Referenced by extractHooks(), and setArrayHookHandler().
|
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 772 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 752 of file ExtensionProcessor.php.
Referenced by extractAttributes(), extractInfo(), and getExtractedInfo().
|
protected |
Any thing else in the $info that hasn't already been processed.
Definition at line 183 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Things to be called once registration of these extensions are done keyed by the name of the extension that it belongs to.
Definition at line 165 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Definition at line 175 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Definition at line 170 of file ExtensionProcessor.php.
Referenced by extractCredits(), and getExtractedInfo().
|
protected |
Things that should be define()'d.
Definition at line 157 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
protected |
Extension attributes, keyed by name => settings.
Definition at line 191 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 147 of file ExtensionProcessor.php.
Referenced by getExtractedInfo().
|
staticprotected |
Keys that should be set to $GLOBALS.
Definition at line 10 of file ExtensionProcessor.php.