MediaWiki REL1_31
|
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. | |
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, except(), parseScalar(), wfRestoreWarnings(), and wfSuppressWarnings().
|
private |
string | $got | |
string | $expected |
Definition at line 143 of file QuickArrayReader.php.
Referenced by __construct().
QuickArrayReader::getVar | ( | $varname | ) |
string | $varname |
Definition at line 207 of file QuickArrayReader.php.
QuickArrayReader::parseScalar | ( | $token | ) |
Parse a scalar value in PHP.
string | $token |
Definition at line 160 of file QuickArrayReader.php.
References wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by __construct().
|
private |
Definition at line 10 of file QuickArrayReader.php.