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

Class: Text_Wiki_Parse_Default_Image

Source Location: /Text_Wiki-1.2.4/Text/Wiki/Parse/Default/Image.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Default_Image

Parses for image placement.


Author(s):

Version:

  • Release: @package_version@

Variables

Methods


Inherited Variables

Inherited Methods

Class: Text_Wiki_Parse

Text_Wiki_Parse::__construct()
Constructor for this parser rule.
Text_Wiki_Parse::Text_Wiki_Parse()
Constructor for this parser rule.
Text_Wiki_Parse::getAttrs()
Extract 'attribute="value"' portions of wiki markup.
Text_Wiki_Parse::getConf()
Simple method to safely get configuration key values.
Text_Wiki_Parse::parse()
Abstrct method to parse source text for matches.
Text_Wiki_Parse::process()
Abstract method to generate replacements for matched text.

Class Details

[line 31]
Parses for image placement.
  • Author: Paul M. Jones <pmjones@php.net>
  • Version: Release: @package_version@


[ 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 39]

URL schemes recognized by this rule.
  • Access: public

Type:   array
Overrides:   Array


[ Top ]

$regex =  '/(\[\[image\s+)(.+?)(\]\])/i'

[line 56]

The regular expression used to find source text matching this rule.
  • Access: public

Type:   string
Overrides:   Array


[ Top ]

$url =  ''

[line 66]

The regular expressions used to check ecternal urls

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 76]

The __construct( object &$obj)

Constructor.

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

  • Return: parser object
  • Access: public

Overrides Text_Wiki_Parse::__construct() (Constructor for this parser rule.)

Parameters:

object   &$obj   —  the base conversion handler

[ Top ]

Text_Wiki_Parse_Default_Image (Constructor)   [line 97]

The Text_Wiki_Parse_Default_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 ]

process   [line 119]

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

Overrides Text_Wiki_Parse::process() (Abstract method to generate replacements for matched text.)

Parameters:

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

[ Top ]


Documentation generated on Tue, 12 Mar 2019 21:49:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.