Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Class: Text_Wiki_Parse_Image

Source Location: /Text_Wiki_Mediawiki-0.0.1/Text/Wiki/Parse/Mediawiki/Image.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Image

Parses for image placement.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Parses for image placement.


[ Top ]


Class Variables

$conf = array(
        'schemes' => 'http|https|ftp|gopher|news',
        'host_regexp' => '(?:[^.\s/"\'<\\\#delim#\ca-\cz]+\.)*[a-z](?:[-a-z0-9]*[a-z0-9])?\.?',
        'path_regexp' => '(?:/[^\s"<\\\#delim#\ca-\cz]*)?'
    )

[line 43]

URL schemes recognized by this rule.
  • Access: public

Type:   array


[ Top ]

$regex =  '/\[\[(image|bild)(\:|\s+)(.+)\]\]/i'

[line 60]

The regular expression used to find source text matching this rule. It already containt the german localization.
  • Access: public

Type:   string


[ Top ]

$url =  ''

[line 70]

The regular expressions used to check external urls
  • See: parse()
  • Access: public

Type:   string


[ Top ]



Method Detail

Text_Wiki_Parse_Image (Constructor)   [line 80]

The Text_Wiki_Parse_Image( object &$obj)

Constructor.

We override the constructor to build up the url regex from config

  • Return: parser object
  • Access: public

Parameters:

object   &$obj   —  the base conversion handler

[ Top ]

getAttrs   [line 140]

void getAttrs( $text)


Parameters:

   $text   — 

[ Top ]

process   [line 110]

A process( array &$matches)

Generates a token entry for the matched text. Token options are:

'src' => The image source, typically a relative path name.

'opts' => Any macro options following the source.

  • Return: delimited token number to be used as a placeholder in the source text.
  • Access: public

Parameters:

array   &$matches   —  The array of matches from parse().

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:32:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.