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

Class: Text_Wiki_Parse_Default_Smiley

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

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Default_Smiley

Smiley rule parser class for Default.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 bertrand Gugger

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 33]
Smiley rule parser class for Default.


[ Top ]


Class Variables

$conf = array(
        'smileys' => array(
            ':D'        => array('biggrin', 'Very Happy', ':grin:'),':)'=>array('smile','Smile','(:'),':('=>array('sad','Sad','):'),':o'=>array('surprised','Surprised',':eek:','o:'),':shock:'=>array('eek','Shocked'),':?'=>array('confused','Confused',':???:'),'8)'=>array('cool','Cool','(8'),':lol:'=>array('lol','Laughing'),':x'=>array('mad','Mad'),':P'=>array('razz','Razz'),':oops:'=>array('redface','Embarassed'),':cry:'=>array('cry','Crying or Very sad'),':evil:'=>array('evil','Evil or Very Mad'),':twisted:'=>array('twisted','Twisted Evil'),':roll:'=>array('rolleyes','Rolling Eyes'),';)'=>array('wink','Wink','(;'),':!:'=>array('exclaim','Exclamation'),':?:'=>array('question','Question'),':idea:'=>array('idea','Idea'),':arrow:'=>array('arrow','Arrow'),':|'=>array('neutral','Neutral','|:'),':mrgreen:'=>array('mrgreen','Mr. Green'),),'auto_nose'=>true)

[line 49]

Configuration keys for this rule

'smileys' => array Smileys recognized by this rule, symbols key definitions: 'symbol' => array ( 'name', 'description' [, 'variante', ...] ) as ':)' => array('smile', 'Smile'), ':D' => array('biggrin', 'Very Happy',':grin:'), the eventual elements after symbol and description are variantes

'auto_nose' => boolean enabling the auto nose feature: auto build a variante for 2 chars symbols by inserting a '-' as ':)' <=> ':-)'

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

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 94]

The __construct( object &$obj)

Constructor.

We override the constructor to build up the 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_Smiley (Constructor)   [line 144]

The Text_Wiki_Parse_Default_Smiley( 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 159]

string process( array &$matches)

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

'symbol' => the original marker 'name' => the name of the smiley 'desc' => the description of the smiley

  • Return: Delimited token representing the smiley
  • 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:21 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.