[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

(pas de description)

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

Définit 1 class

Text_Wiki_Rule_toc:: (4 méthodes):
  parse()
  process()
  _getEntries()
  renderXhtml()


Classe: Text_Wiki_Rule_toc  - X-Ref

This class implements a Text_Wiki_Rule to find all heading tokens and
build a table of contents.  The [[toc]] tag gets replaced with a list
of all the level-2 through level-6 headings.

parse()   X-Ref
Custom parsing (have to process heading entries first).


process(&$matches)   X-Ref
Generates a replacement for the matched text.  Token options are:

'type' => ['list_start'|'list_end'|'item_end'|'item_end'|'target']

'level' => The heading level (1-6).

'count' => Which heading this is in the list.

param: array &$matches The array of matches from parse().
return: string A token indicating the TOC collection point.

_getEntries()   X-Ref
Finds all headings in the text and saves them in $this->entry.

return: void

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