MediaWiki REL1_32
|
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, $phpVersion, array $phpExtensions) | |
checkArray (array $extDependencies) | |
Check all given dependencies if they are compatible with the named installed extensions in the $credits array. | |
setLoadedExtensionsAndSkins (array $credits) | |
Set an array with credits of all loaded extensions and skins. | |
Private Member Functions | |
handleDependency ( $version, $constraint, $checkedExt) | |
Handle a simple dependency to MediaWiki core or PHP. | |
handleExtensionDependency ( $dependencyName, $constraint, $checkedExt, $type) | |
Handle a dependency to another extension. | |
setCoreVersion ( $coreVersion) | |
Set MediaWiki core version. | |
setPhpVersion ( $phpVersion) | |
Set PHP version. | |
Private Attributes | |
Constraint bool | $coreVersion = false |
representing $wgVersion | |
array | $loaded = [] |
Loaded extensions. | |
string[] | $phpExtensions = [] |
List of installed PHP extensions. | |
Constraint bool | $phpVersion = false |
representing PHP version | |
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, | |
$phpVersion, | |||
array | $phpExtensions | ||
) |
string | $coreVersion | Current version of core |
string | $phpVersion | Current PHP version |
string[] | $phpExtensions | List of installed PHP extensions |
Definition at line 63 of file VersionChecker.php.
References $phpExtensions, setCoreVersion(), and setPhpVersion().
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', 'platform': { 'php': '>= 7.0.0', 'ext-foo': '*' }, 'extensions' => { 'FooBaz' => '>= 1.25.0' }, 'skins' => { 'BazBar' => '>= 1.0.0' } } }
array | $extDependencies | All extensions that depend on other ones |
Definition at line 138 of file VersionChecker.php.
References as, handleDependency(), handleExtensionDependency(), and ExtensionRegistry\MEDIAWIKI_CORE.
|
private |
Handle a simple dependency to MediaWiki core or PHP.
See handleMediaWikiDependency and handlePhpDependency for details.
Constraint | bool | $version | The version installed |
string | $constraint | The required version constraint for this dependency |
string | $checkedExt | The Extension, which depends on this dependency |
Definition at line 233 of file VersionChecker.php.
Referenced by checkArray().
|
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 |
string | $type | Either 'extensions' or 'skins' |
Definition at line 257 of file VersionChecker.php.
References $e.
Referenced by checkArray().
|
private |
Set MediaWiki core version.
string | $coreVersion | Current version of core |
Definition at line 87 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 76 of file VersionChecker.php.
|
private |
Set PHP version.
string | $phpVersion | Current PHP version. Must be well-formed. |
UnexpectedValueException |
Definition at line 105 of file VersionChecker.php.
References $phpVersion.
Referenced by __construct().
|
private |
representing $wgVersion
Definition at line 36 of file VersionChecker.php.
Referenced by setCoreVersion().
|
private |
Loaded extensions.
Definition at line 51 of file VersionChecker.php.
|
private |
List of installed PHP extensions.
Definition at line 46 of file VersionChecker.php.
Referenced by __construct().
|
private |
representing PHP version
Definition at line 41 of file VersionChecker.php.
Referenced by setPhpVersion().
|
private |
Definition at line 56 of file VersionChecker.php.