MediaWiki REL1_40
VersionChecker Class Reference

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, 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

Provides functions to check a set of extensions with dependencies against a set of loaded extensions and given version information.

Since
1.29

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: