◆ __construct()
__construct |
( |
|
$range_id = null , |
|
|
|
$page_id = null |
|
) |
| |
Initializes a new WikiFormat instance.
- Parameters
-
string | null | $range_id | ID of the course or institute. |
◆ addWikiMarkup()
static addWikiMarkup |
( |
|
$name, |
|
|
|
$start, |
|
|
|
$end, |
|
|
|
$callback, |
|
|
|
$before = null |
|
) |
| |
|
static |
Adds a new markup rule to the wiki 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:
- $markup the markup parser object
- $matches match results of preg_match for $start
- $contents (parsed) contents of this markup rule
Sometimes you may want your rule to apply before another specific rule will apply. For this case the parameter $before defines a rulename of existing markup, before which your rule should apply.
- Parameters
-
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 |
string | $before | mark before which rule this rule should be appended |
◆ getPageId()
Returns the page_id of the wiki-page for which the markup is desired.
- Returns
- string|null
◆ getRangeId()
Returns the range_id of the wiki-page for which the markup is desired.
- Returns
- string|null
◆ getWikiMarkup()
static getWikiMarkup |
( |
|
$name | ) |
|
|
static |
Returns a single markup-rule if it exists.
- Returns
- array: array('start' => "...", 'end' => "...", 'callback' => "...")
◆ markupWikiComments()
static markupWikiComments |
( |
|
$markup, |
|
|
|
$matches |
|
) |
| |
|
staticprotected |
Stud.IP markup for wiki-comments
- Parameters
-
- Returns
- string
◆ markupWikiLinks()
static markupWikiLinks |
( |
|
$markup, |
|
|
|
$matches |
|
) |
| |
|
staticprotected |
Stud.IP markup for wiki links
- Parameters
-
- Returns
- string
◆ removeWikiMarkup()
static removeWikiMarkup |
( |
|
$name | ) |
|
|
static |
Removes a markup rule from the wiki markup set.
- Parameters
-
string | $name | Name of the rule |
The documentation for this class was generated from the following file: