|
MediaWiki master
|
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. | |
| 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 ( $introText, $longTitle, $longHtml) | |
| Returns an error page, which is suitable for output to the end user via a web browser. | |
| outputHTMLHeader () | |
| Output headers that prevents error pages to be cached. | |
| setFormat ( $format) | |
| Set the format used for errors. | |
| setScriptPath ( $scriptPath) | |
| Set the script path used for images in HTML-formatted errors. | |
| triggerError ( $web, $cliText) | |
| Display something vaguely comprehensible in the event of a totally unrecoverable error. | |
Public Attributes | |
| string | $format = 'text' |
| The format used for errors. | |
| string[] | $functionsExtensionsMapping |
| A mapping of PHP functions to PHP extensions. | |
| string | $mwVersion = '1.46' |
| The number of the MediaWiki version used. | |
| string | $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 21 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 triggerError().
| PHPVersionCheck::checkRequiredPHPVersion | ( | ) |
Displays an error, if the installed PHP version does not meet the minimum requirement.
Definition at line 67 of file PHPVersionCheck.php.
References triggerError().
| PHPVersionCheck::checkVendorExistence | ( | ) |
Displays an error, if the vendor/autoload.php file could not be found.
Definition at line 145 of file PHPVersionCheck.php.
References triggerError().
| PHPVersionCheck::getIndexErrorOutput | ( | $introText, | |
| $longTitle, | |||
| $longHtml ) |
Returns an error page, which is suitable for output to the end user via a web browser.
| string | $introText | |
| string | $longTitle | |
| string | $longHtml |
Definition at line 246 of file PHPVersionCheck.php.
Referenced by triggerError().
| PHPVersionCheck::outputHTMLHeader | ( | ) |
Output headers that prevents error pages to be cached.
Definition at line 230 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 51 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 60 of file PHPVersionCheck.php.
References $scriptPath.
| PHPVersionCheck::triggerError | ( | $web, | |
| $cliText ) |
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).
This function immediately terminates the PHP process.
| string[] | $web |
|
| string | $cliText |
Definition at line 311 of file PHPVersionCheck.php.
References getIndexErrorOutput(), and outputHTMLHeader().
Referenced by checkExtensionExistence(), checkRequiredPHPVersion(), and checkVendorExistence().
| string PHPVersionCheck::$format = 'text' |
The format used for errors.
One of "text" or "html"
Definition at line 39 of file PHPVersionCheck.php.
Referenced by setFormat().
| string [] PHPVersionCheck::$functionsExtensionsMapping |
A mapping of PHP functions to PHP extensions.
Definition at line 26 of file PHPVersionCheck.php.
| string PHPVersionCheck::$mwVersion = '1.46' |
The number of the MediaWiki version used.
If you're updating MW_VERSION in Defines.php, you must also update this value.
Definition at line 23 of file PHPVersionCheck.php.
| string PHPVersionCheck::$scriptPath = '/' |
Definition at line 44 of file PHPVersionCheck.php.
Referenced by setScriptPath().