Stud.IP
5.4
|
Public Member Functions | |
__construct () | |
Public Member Functions inherited from TextFormat | |
__construct ($markup_rules=[]) | |
addMarkup ($name, $start, $end, $callback, $before=null) | |
getMarkup ($name) | |
removeMarkup ($name) | |
format ($text) | |
quote ($text) | |
isInsideOf ($rule) | |
Static Public Member Functions | |
static static | getStudipMarkups () |
static | addStudipMarkup ($name, $start, $end, $callback) |
static | removeStudipMarkup ($name) |
Static Protected Member Functions | |
static | markupSignature ($markup, $matches) |
static | markupNoFormat ($markup, $matches) |
Additional Inherited Members | |
Protected Member Functions inherited from TextFormat | |
formatParts ($text, &$parts, $open_rule=NULL) | |
Format class to transform text before it is saved into the database.
__construct | ( | ) |
Initializes a new StudipFormat instance.
|
static |
Adds a new markup rule to the global Stud.IP markup set. This can also be used to replace an existing markup rule. The end regular expression is optional (i.e. may be NULL) to indicate that this rule has an empty content model. The callback is called whenever the rule matches and is passed the following arguments:
string | $name | name of this rule |
string | $start | start regular expression |
string | $end | end regular expression (optional) |
callback | $callback | function generating output of this rule |
|
static |
Returns the list of global Stud.IP markup rules as an array. Each entry has the following attributes: 'start', 'end' and 'callback'. The rule name is used as the entry's array key.
|
staticprotected |
Stud.IP markup for unformatted text
|
staticprotected |
Stud.IP markup for signatures
|
static |
Removes a markup rule from the global Stud.IP markup set.
string | $name | name of the rule |