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

Class: Text_Wiki_Parse_Default_Freelink

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

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Default_Freelink

Parses for freelinked page links.


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 42]
Parses for freelinked page links.

This class implements a Text_Wiki_Parse_Default to find source text marked as a wiki freelink, and automatically create a link to that page.

A freelink is any page name not conforming to the standard StudlyCapsStyle for a wiki page name. For example, a page normally named MyHomePage can be renamed and referred to as ((My Home Page)) -- note the spaces in the page name. You can also make a "nice-looking" link without renaming the target page; e.g., ((MyHomePage|My Home Page)). Finally, you can use named anchors on the target page: ((MyHomePage|My Home Page#Section1)).

  • Author: Paul M. Jones <pmjones@php.net>
  • Version: Release: @package_version@


[ Top ]


Class Variables

$conf = array (
                       'utf-8' => false
    )

[line 44]


Type:   mixed
Overrides:   Array


[ Top ]



Method Detail

Text_Wiki_Parse_Default_Freelink (Constructor)   [line 97]

Text_Wiki_Parse_Default_Freelink Text_Wiki_Parse_Default_Freelink( object &$obj)

Constructor. We override the Text_Wiki_Parse_Default constructor so we can explicitly comment each part of the $regex property.
  • Access: public

Parameters:

object   &$obj   —  The calling "parent" Text_Wiki object.

[ Top ]

__construct (Constructor)   [line 59]

Text_Wiki_Parse_Default_Freelink __construct( object &$obj)

Constructor. We override the Text_Wiki_Parse_Default constructor so we can explicitly comment each part of the $regex property.
  • Access: public

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

Parameters:

object   &$obj   —  The calling "parent" Text_Wiki object.

[ Top ]

process   [line 123]

A process( array &$matches)

Generates a replacement for the matched text. Token options are:

'page' => the wiki page name (e.g., HomePage).

'text' => alternative text to be displayed in place of the wiki page name.

'anchor' => a named anchor on the target wiki page

  • Return: delimited token to be used as a placeholder in the source text, plus any text priot to the match.
  • 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:18 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.