MediaWiki
1.34.0
|
Check PHP Version, as well as for composer dependencies in entry points, and display something vaguely comprehensible in the event of a totally unrecoverable error. More...
Public Member Functions | |
checkExtensionExistence () | |
Displays an error, if a PHP extension does not exist. More... | |
checkRequiredPHPVersion () | |
Displays an error, if the installed PHP version does not meet the minimum requirement. More... | |
checkVendorExistence () | |
Displays an error, if the vendor/autoload.php file could not be found. More... | |
getIndexErrorOutput ( $title, $longHtml, $shortText) | |
Returns an error page, which is suitable for output to the end user via a web browser. More... | |
getPHPInfo () | |
Return the version of the installed PHP implementation. More... | |
outputHTMLHeader () | |
Output headers that prevents error pages to be cached. More... | |
setFormat ( $format) | |
Set the format used for errors. More... | |
setScriptPath ( $scriptPath) | |
Set the script path used for images in HTML-formatted errors. More... | |
triggerError ( $title, $shortText, $longText, $longHtml) | |
Display something vaguely comprehensible in the event of a totally unrecoverable error. More... | |
Public Attributes | |
$format = 'text' | |
$functionsExtensionsMapping | |
$mwVersion = '1.34' | |
$scriptPath = '/' | |
Check PHP Version, as well as for composer dependencies in entry points, and display something vaguely comprehensible in the event of a totally unrecoverable error.
Definition at line 35 of file PHPVersionCheck.php.
PHPVersionCheck::checkExtensionExistence | ( | ) |
Displays an error, if a PHP extension does not exist.
Definition at line 174 of file PHPVersionCheck.php.
References $ext, and triggerError().
PHPVersionCheck::checkRequiredPHPVersion | ( | ) |
Displays an error, if the installed PHP version does not meet the minimum requirement.
Definition at line 106 of file PHPVersionCheck.php.
References getPHPInfo(), and triggerError().
PHPVersionCheck::checkVendorExistence | ( | ) |
Displays an error, if the vendor/autoload.php file could not be found.
Definition at line 148 of file PHPVersionCheck.php.
References triggerError().
PHPVersionCheck::getIndexErrorOutput | ( | $title, | |
$longHtml, | |||
$shortText | |||
) |
Returns an error page, which is suitable for output to the end user via a web browser.
string | $title | |
string | $longHtml | |
string | $shortText |
Definition at line 230 of file PHPVersionCheck.php.
Referenced by triggerError().
PHPVersionCheck::getPHPInfo | ( | ) |
Return the version of the installed PHP implementation.
TODO: Deprecate/remove this workaround now that HHVM isn't supported.
Definition at line 92 of file PHPVersionCheck.php.
Referenced by checkRequiredPHPVersion().
PHPVersionCheck::outputHTMLHeader | ( | ) |
Output headers that prevents error pages to be cached.
Definition at line 213 of file PHPVersionCheck.php.
Referenced by triggerError().
PHPVersionCheck::setFormat | ( | $format | ) |
Set the format used for errors.
string | $format | One of "text" or "html" |
Definition at line 64 of file PHPVersionCheck.php.
References $format.
PHPVersionCheck::setScriptPath | ( | $scriptPath | ) |
Set the script path used for images in HTML-formatted errors.
string | $scriptPath |
Definition at line 73 of file PHPVersionCheck.php.
References $scriptPath.
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.
string | $title | HTML code to be put within an tag @param string $shortText @param string $longText @param string $longHtml |
Definition at line 296 of file PHPVersionCheck.php.
References $title, getIndexErrorOutput(), and outputHTMLHeader().
Referenced by checkExtensionExistence(), checkRequiredPHPVersion(), and checkVendorExistence().
PHPVersionCheck::$format = 'text' |
Definition at line 52 of file PHPVersionCheck.php.
Referenced by setFormat().
PHPVersionCheck::$functionsExtensionsMapping |
Definition at line 40 of file PHPVersionCheck.php.
PHPVersionCheck::$mwVersion = '1.34' |
Definition at line 37 of file PHPVersionCheck.php.
string PHPVersionCheck::$scriptPath = '/' |
Definition at line 57 of file PHPVersionCheck.php.
Referenced by setScriptPath().