Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
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. | |
Public Attributes | |
bool | $casesensitive |
whether the match needs to be case sensitive. | |
bool | $fullmatch |
whether to match complete words. | |
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 callable | $replacementcallback |
hold a replacement function to be called. | |
null array | $replacementcallbackdata |
data to be passed to $replacementcallback. | |
null string | $replacementphrase |
replacement text to go inside begin and end. | |
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.