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

Class: Text_Wiki_Parse_Image

Source Location: /Text_Wiki_BBCode-0.0.4/Text/Wiki/Parse/BBCode/Image.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Image

Image rule parser class for BBCode.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 bertrand Gugger

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
Image rule parser class for BBCode.


[ Top ]


Class Variables

$conf = array(
        'schemes' => 'http|ftp|https|ftps',  // can be also as array of regexps/strings
        'extensions' => 'jpg|jpeg|gif|png',  // can be also as array of regexps/strings
        'url_regexp' =>
         '(?:[^.\s/"\'<\\\#delim#\ca-\cz]+\.)*[a-z](?:[-a-z0-9]*[a-z0-9])?\.?(?:/[^\s"<>\\\#delim#\ca-\cz]*)?',
        'local_regexp' => '(?:/?[^/\s"<\\\#delim#\ca-\cz]+)*'
    )

[line 47]

Configuration keys for this rule

'schemes' => URL scheme(s) (array) recognized by this rule, default is 'http|ftp|https|ftps' That is some (array of) regex string(s), must be safe with a pattern delim '#' 'extensions' => URL scheme(s) (array) recognized by this rule, default is 'jpg|jpeg|gif|png' That is some (array of) regex string(s), must be safe with a pattern delim '#' 'url_regexp' => the regexp used to match the url after 'scheme://' and before '.extension' 'path_regexp' => the regexp used to match the local images path before '.extension'

  • Var: 'config-key' => mixed config-value
  • Access: public

Type:   array


[ Top ]



Method Detail

Text_Wiki_Parse_Image (Constructor)   [line 63]

The Text_Wiki_Parse_Image( object &$obj)

Constructor.

We override the constructor to build up the regex from config

  • Return: parser object
  • Access: public

Parameters:

object   &$obj   —  the base conversion handler

[ Top ]

process   [line 97]

string process( array &$matches)

Generates a replacement token for the matched text. Token options are: 'src' => the URL / path to the image 'attr' => empty for basic BBCode
  • Return: Delimited token representing the image
  • Access: public

Parameters:

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

[ Top ]


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