|
Cheetah
|
Public Member Functions | |
| parseFile ($file) | |
| parseMultiFile ($file) | |
Public Attributes | |
| $default = 'ID' | |
Protected Member Functions | |
| parseHandle ($fh) | |
Parses string hash files. File format is as such:
DefaultKeyValue KEY: Value KEY2: Value2 --MULTILINE-KEY-- Multiline value.
Which would output something similar to:
array(
'ID' => 'DefaultKeyValue',
'KEY' => 'Value',
'KEY2' => 'Value2',
'MULTILINE-KEY' => "Multiline\nvalue.\n",
)
We use this as an easy to use file-format for configuration schema files, but the class itself is usage agnostic.
You can use -— to forcibly terminate parsing of a single string-hash; this marker is used in multi string-hashes to delimit boundaries.
Definition at line 8493 of file HTMLPurifier.standalone.php.
| HTMLPurifier_StringHashParser::parseFile | ( | $file | ) |
Parses a file that contains a single string-hash.
| string | $file |
Definition at line 8506 of file HTMLPurifier.standalone.php.
|
protected |
Internal parser that acepts a file handle.
| resource | $fh | File handle with pointer at start of valid string-hash block. |
Definition at line 8551 of file HTMLPurifier.standalone.php.
| HTMLPurifier_StringHashParser::parseMultiFile | ( | $file | ) |
Parses a file that contains multiple string-hashes delimited by '-—'
| string | $file |
Definition at line 8525 of file HTMLPurifier.standalone.php.
| HTMLPurifier_StringHashParser::$default = 'ID' |
@type string
Definition at line 8499 of file HTMLPurifier.standalone.php.