MediaWiki REL1_29
PHPVersionCheck Class Reference
Collaboration diagram for PHPVersionCheck:

Public Member Functions

 checkExtensionExistence ()
 Displays an error, if a PHP extension does not exist.
 
 checkRequiredPHPVersion ()
 Displays an error, if the installed php version does not meet the minimum requirement.
 
 checkVendorExistence ()
 Displays an error, if the vendor/autoload.php file could not be found.
 
 getIndexErrorOutput ( $title, $longHtml, $shortText)
 Returns an error page, which is suitable for output to the end user via a web browser.
 
 getPHPImplVersion ()
 Returns the version of the installed php implementation.
 
 outputHTMLHeader ()
 Output headers that prevents error pages to be cached.
 
 setEntryPoint ( $entryPoint)
 
 triggerError ( $title, $shortText, $longText, $longHtml)
 Display something vaguely comprehensible in the event of a totally unrecoverable error.
 

Public Attributes

string $entryPoint = null
 Which entry point we are protecting.
 
 $functionsExtensionsMapping
 
 $minimumVersionPHP = '5.5.9'
 
 $mwVersion = '1.29'
 

Detailed Description

Definition at line 27 of file PHPVersionCheck.php.

Member Function Documentation

◆ checkExtensionExistence()

PHPVersionCheck::checkExtensionExistence ( )

Displays an error, if a PHP extension does not exist.

Returns
$this

Definition at line 137 of file PHPVersionCheck.php.

References $ext, are, array(), as, PHP, that, and triggerError().

◆ checkRequiredPHPVersion()

PHPVersionCheck::checkRequiredPHPVersion ( )

Displays an error, if the installed php version does not meet the minimum requirement.

Returns
$this

Definition at line 77 of file PHPVersionCheck.php.

References and(), are, by, copy, from, getPHPImplVersion(), href, of, or, page, PHP, some, triggerError(), updates(), version, and will.

◆ checkVendorExistence()

PHPVersionCheck::checkVendorExistence ( )

Displays an error, if the vendor/autoload.php file could not be found.

Returns
$this

Definition at line 111 of file PHPVersionCheck.php.

References from, href, on, or, see, some, that, and triggerError().

◆ getIndexErrorOutput()

PHPVersionCheck::getIndexErrorOutput (   $title,
  $longHtml,
  $shortText 
)

Returns an error page, which is suitable for output to the end user via a web browser.

Parameters
$title
$longHtml
$shortText
Returns
string

Definition at line 193 of file PHPVersionCheck.php.

References $title, color, div, style, text, and title.

Referenced by triggerError().

◆ getPHPImplVersion()

PHPVersionCheck::getPHPImplVersion ( )

Returns the version of the installed php implementation.

Returns
string

Definition at line 68 of file PHPVersionCheck.php.

Referenced by checkRequiredPHPVersion().

◆ outputHTMLHeader()

PHPVersionCheck::outputHTMLHeader ( )

Output headers that prevents error pages to be cached.

Definition at line 176 of file PHPVersionCheck.php.

Referenced by triggerError().

◆ setEntryPoint()

PHPVersionCheck::setEntryPoint (   $entryPoint)
Parameters
string$entryPointWhich entry point we are protecting. One of:
Returns
$this

Definition at line 59 of file PHPVersionCheck.php.

References $entryPoint.

◆ triggerError()

PHPVersionCheck::triggerError (   $title,
  $shortText,
  $longText,
  $longHtml 
)

Display something vaguely comprehensible in the event of a totally unrecoverable error.

Does not assume access to anything; no globals, no autoloader, no database, no localisation. Safe for PHP4 (and putting this here means that WebStart.php and GlobalSettings.php no longer need to be).

Calling this function kills execution immediately.

Parameters
string$titleHTML code to be put within an

tag @param string $shortText @param string $longText @param string $longHtml

Definition at line 265 of file PHPVersionCheck.php.

References $title, getIndexErrorOutput(), and outputHTMLHeader().

Referenced by checkExtensionExistence(), checkRequiredPHPVersion(), and checkVendorExistence().

Member Data Documentation

◆ $entryPoint

string PHPVersionCheck::$entryPoint = null

Which entry point we are protecting.

One of:

Definition at line 48 of file PHPVersionCheck.php.

Referenced by setEntryPoint().

◆ $functionsExtensionsMapping

PHPVersionCheck::$functionsExtensionsMapping
Initial value:
'mb_substr' => 'mbstring',
'utf8_encode' => 'xml',
'ctype_digit' => 'ctype',
'json_decode' => 'json',
'iconv' => 'iconv',
)
the array() calling protocol came about after MediaWiki 1.4rc1.

Definition at line 32 of file PHPVersionCheck.php.

◆ $minimumVersionPHP

PHPVersionCheck::$minimumVersionPHP = '5.5.9'

Definition at line 31 of file PHPVersionCheck.php.

◆ $mwVersion

PHPVersionCheck::$mwVersion = '1.29'

Definition at line 29 of file PHPVersionCheck.php.


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