MediaWiki
1.30.0
|
Quickie parser class that can happily read the subset of PHP we need for our localization arrays safely. More...
Public Member Functions | |
__construct ( $string) | |
getVar ( $varname) | |
parseScalar ( $token) | |
Parse a scalar value in PHP. More... | |
Private Member Functions | |
except ( $got, $expected) | |
Private Attributes | |
$vars = [] | |
Quickie parser class that can happily read the subset of PHP we need for our localization arrays safely.
Still an order of magnitude slower than eval().
Definition at line 9 of file QuickArrayReader.php.
QuickArrayReader::__construct | ( | $string | ) |
$string | string |
Definition at line 15 of file QuickArrayReader.php.
References $tokens, captcha-old\count, except(), parseScalar(), wfRestoreWarnings(), and wfSuppressWarnings().
|
private |
$got | string |
$expected | string |
Definition at line 143 of file QuickArrayReader.php.
Referenced by __construct().
QuickArrayReader::getVar | ( | $varname | ) |
QuickArrayReader::parseScalar | ( | $token | ) |
Parse a scalar value in PHP.
$token | string |
Definition at line 160 of file QuickArrayReader.php.
References wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by __construct().
|
private |
Definition at line 10 of file QuickArrayReader.php.