[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/bundled-libs/Text/Wiki/Rule/ -> wikilink.php (sommaire)

(pas de description)

Poids: 241 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Text_Wiki_Rule_wikilink:: (5 méthodes):
  Text_Wiki_Rule_wikilink()
  parse()
  processDescr()
  process()
  renderXhtml()


Classe: Text_Wiki_Rule_wikilink  - X-Ref

This class implements a Text_Wiki_Rule to find source text marked as a
wiki page name and automatically create a link to that page.

Wiki page names are typically in StudlyCapsStyle made of
WordsSmashedTogether.

You can also create described links to pages in this style:
[WikiPageName nice text link to use for display]

Text_Wiki_Rule_wikilink(&$obj, $name)   X-Ref
Constructor.  We override the Text_Wiki_Rule constructor so we can
explicitly comment each part of the $regex property.

param: object &$obj The calling "parent" Text_Wiki object.
param: string $name The token name to use for this rule.

parse()   X-Ref
First parses for described links, then for standalone links.

return: void

processDescr(&$matches)   X-Ref
Generates a replacement for described links.  Token options are:

'page' => the wiki page name.

'text' => the displayed link text.

'anchor' => a named anchor on the target wiki page.

param: array &$matches The array of matches from parse().
return: A delimited token to be used as a placeholder in

process(&$matches)   X-Ref
Generates a replacement for standalone links.  Token options are:

'page' => the wiki page name.

'text' => the displayed link text.

'anchor' => a named anchor on the target wiki page.

param: array &$matches The array of matches from parse().
return: A delimited token to be used as a placeholder in

renderXhtml($options)   X-Ref
Renders a token into text matching the requested format.

param: array $options The "options" portion of the token (second
return: string The text rendered from the token options.



Généré le : Sat Nov 24 09:00:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics