MediaWiki
1.30.0
|
Provides functions to check a set of extensions with dependencies against a set of loaded extensions and given version information. More...
Public Member Functions | |
__construct ( $coreVersion) | |
checkArray (array $extDependencies) | |
Check all given dependencies if they are compatible with the named installed extensions in the $credits array. More... | |
setLoadedExtensionsAndSkins (array $credits) | |
Set an array with credits of all loaded extensions and skins. More... | |
Private Member Functions | |
handleExtensionDependency ( $dependencyName, $constraint, $checkedExt) | |
Handle a dependency to another extension. More... | |
handleMediaWikiDependency ( $constraint, $checkedExt) | |
Handle a dependency to MediaWiki core. More... | |
setCoreVersion ( $coreVersion) | |
Set MediaWiki core version. More... | |
Private Attributes | |
Constraint bool | $coreVersion = false |
representing $wgVersion More... | |
array | $loaded = [] |
Loaded extensions. More... | |
VersionParser | $versionParser |
Provides functions to check a set of extensions with dependencies against a set of loaded extensions and given version information.
Definition at line 32 of file VersionChecker.php.
VersionChecker::__construct | ( | $coreVersion | ) |
string | $coreVersion | Current version of core |
Definition at line 51 of file VersionChecker.php.
References setCoreVersion().
VersionChecker::checkArray | ( | array | $extDependencies | ) |
Check all given dependencies if they are compatible with the named installed extensions in the $credits array.
Example $extDependencies: { 'FooBar' => { 'MediaWiki' => '>= 1.25.0', 'extensions' => { 'FooBaz' => '>= 1.25.0' }, 'skins' => { 'BazBar' => '>= 1.0.0' } } }
array | $extDependencies | All extensions that depend on other ones |
Definition at line 105 of file VersionChecker.php.
References as, handleExtensionDependency(), handleMediaWikiDependency(), and ExtensionRegistry\MEDIAWIKI_CORE.
|
private |
Handle a dependency to another extension.
string | $dependencyName | The name of the dependency |
string | $constraint | The required version constraint for this dependency |
string | $checkedExt | The Extension, which depends on this dependency |
Definition at line 169 of file VersionChecker.php.
Referenced by checkArray().
|
private |
Handle a dependency to MediaWiki core.
It will check, if a MediaWiki version constraint was set with self::setCoreVersion before this call (if not, it will return an empty array) and checks the version constraint given against it.
string | $constraint | The required version constraint for this dependency |
string | $checkedExt | The Extension, which depends on this dependency |
Definition at line 144 of file VersionChecker.php.
Referenced by checkArray().
|
private |
Set MediaWiki core version.
string | $coreVersion | Current version of core |
Definition at line 73 of file VersionChecker.php.
References $coreVersion, and $e.
Referenced by __construct().
VersionChecker::setLoadedExtensionsAndSkins | ( | array | $credits | ) |
Set an array with credits of all loaded extensions and skins.
array | $credits | An array of installed extensions with credits of them |
Definition at line 62 of file VersionChecker.php.
|
private |
representing $wgVersion
Definition at line 36 of file VersionChecker.php.
Referenced by setCoreVersion().
|
private |
Loaded extensions.
Definition at line 41 of file VersionChecker.php.
|
private |
Definition at line 46 of file VersionChecker.php.