Stud.IP  2.4 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
StudipFormat Class Reference
Inheritance diagram for StudipFormat:
Inheritance graph
Collaboration diagram for StudipFormat:
Collaboration graph

Public Member Functions

 __construct ()
- Public Member Functions inherited from TextFormat
 __construct ($markup_rules=array())
 addMarkup ($name, $start, $end, $callback, $before=null)
 getMarkup ($name)
 removeMarkup ($name)
 format ($text)
 quote ($text)

Static Public Member Functions

static getStudipMarkups ()
static addStudipMarkup ($name, $start, $end, $callback, $before=null)
static getStudipMarkup ($name)
static removeStudipMarkup ($name)

Static Protected Member Functions

static markupHeading ($markup, $matches)
static markupHorizontalRule ($markup, $matches)
static markupText ($markup, $matches, $contents)
static markupGreedyText ($markup, $matches)
static markupTextSimple ($markup, $matches)
static markupList ($markup, $matches)
static markupTable ($markup, $matches)
static markupIndent ($markup, $matches)
static markupPreformat ($markup, $matches, $contents)
static markupQuote ($markup, $matches, $contents)
static markupNoFormat ($markup, $matches)
static markupCode ($markup, $matches)
static markupEmails ($markup, $matches)
static markupMedia ($markup, $matches)
static markupLinks ($markup, $matches)

Additional Inherited Members

- Protected Member Functions inherited from TextFormat
 formatParts ($text, &$parts, $open_rule=NULL)

Constructor & Destructor Documentation

__construct ( )

Initializes a new StudipFormat instance.

Reimplemented in WikiFormat.

Member Function Documentation

static addStudipMarkup (   $name,
  $start,
  $end,
  $callback,
  $before = null 
)
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:

  • $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$namename of this rule
string$startstart regular expression
string$endend regular expression (optional)
callback$callbackfunction generating output of this rule
string$beforemark before which rule this rule should be appended
static getStudipMarkup (   $name)
static

Returns a single markup-rule if it exists.

Returns
array: array('start' => "...", 'end' => "...", 'callback' => "...")

Here is the caller graph for this function:

static getStudipMarkups ( )
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.

Returns
array list of all markup rules
static markupCode (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for (PHP) source code

Here is the call graph for this function:

static markupEmails (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for email-adresses

static markupGreedyText (   $markup,
  $matches 
)
staticprotected

Basic text formatting: bold, italics, underline, big, small etc.

static markupHeading (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for headings

static markupHorizontalRule (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for horizontal rule

static markupIndent (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for indented paragraphs

static markupLinks (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for hyperlinks (intern, extern). Has lower priority than [code], [img], etc

Here is the call graph for this function:

static markupList (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for lists (may be nested)

static markupMedia (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for images, audio, video and flash-films

Here is the call graph for this function:

static markupNoFormat (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for unformatted text

static markupPreformat (   $markup,
  $matches,
  $contents 
)
staticprotected

Stud.IP markup for preformatted text

static markupQuote (   $markup,
  $matches,
  $contents 
)
staticprotected

Stud.IP markup for quoted text

static markupTable (   $markup,
  $matches 
)
staticprotected

Stud.IP markup for tables

static markupText (   $markup,
  $matches,
  $contents 
)
staticprotected

Basic text formatting: bold, italics, underline, big, small etc.

static markupTextSimple (   $markup,
  $matches 
)
staticprotected

Basic text formatting: bold, italics, underline etc. (simple form)

static removeStudipMarkup (   $name)
static

Removes a markup rule from the global Stud.IP markup set.

Parameters
string$namename of the rule

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