MediaWiki REL1_41
VersionChecker Class Reference

Check whether extensions and their dependencies meet certain version requirements. More...

Public Member Functions

 __construct ( $coreVersion, $phpVersion, array $phpExtensions, array $abilities=[], array $abilityErrors=[])
 
 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.
 

Detailed Description

Check whether extensions and their dependencies meet certain version requirements.

Since
1.29
Author
Legoktm
Florian Schmidt

Definition at line 32 of file VersionChecker.php.

Constructor & Destructor Documentation

◆ __construct()

VersionChecker::__construct ( $coreVersion,
$phpVersion,
array $phpExtensions,
array $abilities = [],
array $abilityErrors = [] )
Parameters
string$coreVersionCurrent version of core
string$phpVersionCurrent PHP version
string[]$phpExtensionsList of installed PHP extensions
bool[]$abilitiesList of provided abilities
string[]$abilityErrorsError messages for the abilities

Definition at line 75 of file VersionChecker.php.

Member Function Documentation

◆ checkArray()

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': '*', 'ability-bar': true }, 'extensions' => { 'FooBaz' => '>= 1.25.0' }, 'skins' => { 'BazBar' => '>= 1.0.0' } } }

Parameters
array$extDependenciesAll extensions that depend on other ones
Returns
array[] List of errors

Definition at line 154 of file VersionChecker.php.

◆ setLoadedExtensionsAndSkins()

VersionChecker::setLoadedExtensionsAndSkins ( array $credits)

Set an array with credits of all loaded extensions and skins.

Parameters
array$creditsAn array of installed extensions with credits of them
Returns
VersionChecker $this

Definition at line 93 of file VersionChecker.php.


The documentation for this class was generated from the following file: