Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
This is just a little object to define a phrase and some instructions for how to process it. More...
Public Member Functions | |
__construct ($phrase, $hreftagbegin='< span class="highlight">', $hreftagend='</span >', $casesensitive=false, $fullmatch=false, $replacementphrase=null, $replacementcallback=null, array $replacementcallbackdata=null) | |
Constructor. More... | |
Public Attributes | |
bool | $casesensitive |
whether the match needs to be case sensitive. | |
bool | $fullmatch |
whether to match complete words. More... | |
string | $hreftagbegin |
HTML to insert before any match. | |
string | $hreftagend |
HTML to insert after any match. | |
string | $phrase |
this is the phrase that should be matched. | |
null string | $replacementphrase |
replacement text to go inside begin and end. More... | |
null string | $workregexp = null |
once initialised, holds the regexp for matching this phrase. | |
null string | $workreplacementphrase = null |
once initialised, holds the mangled HTML to replace the regexp with. | |
This is just a little object to define a phrase and some instructions for how to process it.
Filters can create an array of these to pass to thelink filter_phrases()} function below.
Note that although the fields here are public, you almost certainly should never use that. All that is supported is contructing new instances of this class, and then passing an array of them to filter_phrases.