[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

(pas de description)

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

Définit 1 class

Text_Wiki_Rule_url:: (6 méthodes):
  Text_Wiki_Rule_url()
  parse()
  process()
  processFootnote()
  processDescr()
  renderXhtml()


Classe: Text_Wiki_Rule_url  - X-Ref

This class implements a Text_Wiki_Rule to find source text marked as a
URL.  Various URL markings are supported: inline (the URL by itself),
numbered or footnote reference (where the URL is enclosed in square brackets), and
named reference (where the URL is enclosed in square brackets and has a
name included inside the brackets).  E.g.:

inline    -- http://example.com
numbered  -- [http://example.com]
described -- [http://example.com Example Description]

When rendering a URL token, this will convert URLs pointing to a .gif,
.jpg, or .png image into an inline <img /> tag (for the 'xhtml'
format).

Text_Wiki_Rule_url(&$obj, $name)   X-Ref
Pas de description

parse()   X-Ref
A somewhat complex parsing method to find three different kinds
of URLs in the source text.


process(&$matches)   X-Ref
Process inline URLs and return replacement text with a delimited
token.

Token options are:
'type' => ['inline'|'footnote'|'descr'] the type of URL
'href' => the URL link href portion
'text' => the displayed text of the URL link

param: array &$matches
param: array $matches An array of matches from the parse() method
return: string The processed text replacement.

processFootnote(&$matches)   X-Ref
Process numbered (footnote) URLs and return replacement text with
a delimited token.

Token options are:
'type' => ['inline'|'footnote'|'descr'] the type of URL
'href' => the URL link href portion
'text' => the displayed text of the URL link

param: array &$matches
param: array $matches An array of matches from the parse() method
return: string The processed text replacement.

processDescr(&$matches)   X-Ref
Process described-reference (named-reference) URLs and return
replacement text with a delimited token.

Token options are:
'type' => ['inline'|'footnote'|'descr'] the type of URL
'href' => the URL link href portion
'text' => the displayed text of the URL link

param: array &$matches
param: array $matches An array of matches from the parse() method
return: string The processed text replacement.

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