|
MediaWiki master
|
Load JSON files, and uses a Processor to extract information. More...
Inherits MediaWiki\DomainEvent\DomainEventSubscriber.

Public Member Functions | |
| clearQueue () | |
| Clear the current load queue. | |
| finish () | |
| After this is called, no more extensions can be loaded. | |
| getAllThings () | |
| Get credits information about all installed extensions and skins. | |
| getAttribute ( $name) | |
| getQueue () | |
| Get the current load queue. | |
| isLoaded ( $name, $constraint=' *') | |
| Whether a thing has been loaded. | |
| loadFromQueue () | |
| queue ( $path) | |
| readFromQueue (array $queue) | |
| Process a queue of extensions and return their extracted data. | |
| registerListeners (DomainEventSource $eventSource) | |
| Register any domain event subscribers defined by extensions. | |
| setAttributeForTest ( $name, array $value) | |
| Force override the value of an attribute during tests. | |
| setCache (BagOStuff $cache) | |
| Set the cache to use for extension info. | |
| setCheckDevRequires ( $check) | |
| setLoadTestClassesAndNamespaces ( $load) | |
| Controls if classes and namespaces defined under the keys TestAutoloadClasses and TestAutoloadNamespaces should be added to the autoloader. | |
| setSettingsBuilder (SettingsBuilder $settingsBuilder) | |
Static Public Member Functions | |
| static | disableForTest () |
| static | enableForTest () |
| static | getInstance () |
Public Attributes | |
| const | MANIFEST_VERSION = 2 |
| Version of the highest supported manifest version Note: Update MANIFEST_VERSION_MW_VERSION when changing this. | |
| const | MANIFEST_VERSION_MW_VERSION = '>= 1.29.0' |
| MediaWiki version constraint representing what the current highest MANIFEST_VERSION is supported in. | |
| const | MEDIAWIKI_CORE = 'MediaWiki' |
| "requires" key that applies to MediaWiki core | |
| const | MERGE_STRATEGY = '_merge_strategy' |
| Special key that defines the merge strategy. | |
| const | OLDEST_MANIFEST_VERSION = 1 |
| Version of the oldest supported manifest version. | |
Protected Member Functions | |
| exportExtractedData (array $info) | |
| getLazyLoadedAttribute ( $name) | |
| Get an attribute value that isn't cached by reading each extension.json file again. | |
| saveToCache (BagOStuff $cache, array $data) | |
| Save data in the cache. | |
Static Protected Member Functions | |
| static | processAutoLoader ( $dir, array $files) |
| Fully expand autoloader paths. | |
Protected Attributes | |
| array | $attributes = [] |
| Items in the JSON file that aren't being set as globals. | |
| bool | $checkDev = false |
| Whether to check dev-requires. | |
| array | $lazyAttributes = [] |
| Lazy-loaded attributes. | |
| bool | $loadTestClassesAndNamespaces = false |
| Whether test classes and namespaces should be added to the auto loader. | |
| int[] | $queued = [] |
| List of paths that should be loaded. | |
| array | $testAttributes = [] |
| Attributes for testing. | |
Load JSON files, and uses a Processor to extract information.
This also adds the extension's classes to the AutoLoader.
Definition at line 35 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::clearQueue | ( | ) |
Clear the current load queue.
Not intended to be used outside of the installer.
Definition at line 380 of file ExtensionRegistry.php.
|
static |
Definition at line 184 of file ExtensionRegistry.php.
|
static |
Definition at line 194 of file ExtensionRegistry.php.
|
protected |
Definition at line 483 of file ExtensionRegistry.php.
References wfArrayPlus2d().
| MediaWiki\Registration\ExtensionRegistry::finish | ( | ) |
After this is called, no more extensions can be loaded.
Definition at line 390 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::getAllThings | ( | ) |
Get credits information about all installed extensions and skins.
Definition at line 713 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::getAttribute | ( | $name | ) |
| string | $name |
Definition at line 617 of file ExtensionRegistry.php.
Referenced by MediaWiki\ResourceLoader\getSkinThemeMap().
|
static |
Definition at line 170 of file ExtensionRegistry.php.
|
protected |
Get an attribute value that isn't cached by reading each extension.json file again.
| string | $name |
Definition at line 650 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::getQueue | ( | ) |
Get the current load queue.
Not intended to be used outside of the installer.
Definition at line 372 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::isLoaded | ( | $name, | |
| $constraint = '*' ) |
Whether a thing has been loaded.
| string | $name | |
| string | $constraint | The required version constraint for this dependency |
Definition at line 597 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::loadFromQueue | ( | ) |
Definition at line 312 of file ExtensionRegistry.php.
|
staticprotected |
Fully expand autoloader paths.
| string | $dir | |
| string[] | $files |
Definition at line 725 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::queue | ( | $path | ) |
| string | $path | Absolute path to the JSON file |
Definition at line 238 of file ExtensionRegistry.php.
References $path, and $wgExtensionInfoMTime.
| MediaWiki\Registration\ExtensionRegistry::readFromQueue | ( | array | $queue | ) |
Process a queue of extensions and return their extracted data.
| int[] | $queue | keys are filenames, values are ignored |
| InvalidArgumentException | |
| ExtensionDependencyError |
Definition at line 437 of file ExtensionRegistry.php.
References $path.
| MediaWiki\Registration\ExtensionRegistry::registerListeners | ( | DomainEventSource | $eventSource | ) |
Register any domain event subscribers defined by extensions.
Implements MediaWiki\DomainEvent\DomainEventSubscriber.
Definition at line 634 of file ExtensionRegistry.php.
References MediaWiki\DomainEvent\DomainEventSource\registerSubscriber().
|
protected |
Save data in the cache.
| BagOStuff | $cache | |
| array | $data |
Definition at line 341 of file ExtensionRegistry.php.
References $wgDevelopmentWarnings, and Wikimedia\ObjectCache\BagOStuff\set().
| MediaWiki\Registration\ExtensionRegistry::setAttributeForTest | ( | $name, | |
| array | $value ) |
Force override the value of an attribute during tests.
| string | $name | Name of attribute to override |
| array | $value | Value to set |
Definition at line 692 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::setCache | ( | BagOStuff | $cache | ) |
Set the cache to use for extension info.
Intended for use during testing.
| BagOStuff | $cache |
Definition at line 209 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::setCheckDevRequires | ( | $check | ) |
| MediaWiki\Registration\ExtensionRegistry::setLoadTestClassesAndNamespaces | ( | $load | ) |
Controls if classes and namespaces defined under the keys TestAutoloadClasses and TestAutoloadNamespaces should be added to the autoloader.
| bool | $load |
Definition at line 231 of file ExtensionRegistry.php.
| MediaWiki\Registration\ExtensionRegistry::setSettingsBuilder | ( | SettingsBuilder | $settingsBuilder | ) |
| SettingsBuilder | $settingsBuilder |
Definition at line 739 of file ExtensionRegistry.php.
|
protected |
Items in the JSON file that aren't being set as globals.
Definition at line 115 of file ExtensionRegistry.php.
|
protected |
Whether to check dev-requires.
Definition at line 143 of file ExtensionRegistry.php.
|
protected |
Lazy-loaded attributes.
Definition at line 129 of file ExtensionRegistry.php.
|
protected |
Whether test classes and namespaces should be added to the auto loader.
Definition at line 150 of file ExtensionRegistry.php.
|
protected |
List of paths that should be loaded.
Definition at line 100 of file ExtensionRegistry.php.
|
protected |
Attributes for testing.
Definition at line 122 of file ExtensionRegistry.php.
| const MediaWiki\Registration\ExtensionRegistry::MANIFEST_VERSION = 2 |
Version of the highest supported manifest version Note: Update MANIFEST_VERSION_MW_VERSION when changing this.
Definition at line 46 of file ExtensionRegistry.php.
Referenced by MediaWiki\Registration\ExtensionJsonValidator\validate().
| const MediaWiki\Registration\ExtensionRegistry::MANIFEST_VERSION_MW_VERSION = '>= 1.29.0' |
MediaWiki version constraint representing what the current highest MANIFEST_VERSION is supported in.
Definition at line 52 of file ExtensionRegistry.php.
| const MediaWiki\Registration\ExtensionRegistry::MEDIAWIKI_CORE = 'MediaWiki' |
"requires" key that applies to MediaWiki core
Definition at line 40 of file ExtensionRegistry.php.
Referenced by MediaWiki\Registration\VersionChecker\checkArray().
| const MediaWiki\Registration\ExtensionRegistry::MERGE_STRATEGY = '_merge_strategy' |
Special key that defines the merge strategy.
Definition at line 71 of file ExtensionRegistry.php.
Referenced by MediaWiki\Registration\ExtensionProcessor\getExtractedInfo().
| const MediaWiki\Registration\ExtensionRegistry::OLDEST_MANIFEST_VERSION = 1 |
Version of the oldest supported manifest version.
Definition at line 57 of file ExtensionRegistry.php.
Referenced by MediaWiki\Registration\ExtensionJsonValidator\validate().