Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
HTMLPurifier_StringHashParser Class Reference

Public Member Functions

 parseFile ($file)
 Parses a file that contains a single string-hash.
 
 parseMultiFile ($file)
 Parses a file that contains multiple string-hashes delimited by '-—'.
 

Public Attributes

 $default = 'ID'
 @type string
 

Protected Member Functions

 parseHandle ($fh)
 Internal parser that acepts a file handle.
 

Member Function Documentation

◆ parseFile()

HTMLPurifier_StringHashParser::parseFile ( $file)

Parses a file that contains a single string-hash.

Parameters
string$file
Return values
array

◆ parseHandle()

HTMLPurifier_StringHashParser::parseHandle ( $fh)
protected

Internal parser that acepts a file handle.

Note
While it's possible to simulate in-memory parsing by using custom stream wrappers, if such a use-case arises we should factor out the file handle into its own class.
Parameters
resource$fhFile handle with pointer at start of valid string-hash block.
Return values
array

◆ parseMultiFile()

HTMLPurifier_StringHashParser::parseMultiFile ( $file)

Parses a file that contains multiple string-hashes delimited by '-—'.

Parameters
string$file
Return values
array

The documentation for this class was generated from the following file: