[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/bundled-libs/Text/Wiki/Parse/Default/ -> Url.php (sommaire)

(pas de description)

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

Définit 1 class

Text_Wiki_Parse_Url:: (5 méthodes):
  Text_Wiki_Parse_Url()
  parse()
  process()
  processFootnote()
  processDescr()


Classe: Text_Wiki_Parse_Url  - X-Ref

Parse for URLS in the source text.

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).

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

$Id: Url.php,v 1.1 2005/01/31 15:46:52 pmjones Exp $

Text_Wiki_Parse_Url(&$obj)   X-Ref
Constructor.

We override the constructor so we can comment the regex nicely.


parse()   X-Ref
Find three different kinds of URLs in the source text.


process(&$matches)   X-Ref
Process inline URLs.

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.

Token options are:
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.

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.



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