rcmail_string_replacer

Extends \rcube_string_replacer

Helper class for turning URLs and email addresses in plaintext content into clickable links.

package

Webmail

subpackage

Utils

Methods

Callback function used to build mailto: links around e-mail strings

mailto_callback($matches) : int
inherited

Arguments

$matches

Response

int

Index of saved string value

__construct

__construct($options = array()) 
inherited

Arguments

$options

Add a string to the internal list

add($str) : int
inherited

Arguments

$str

Response

int

Index of value for retrieval

Build replacement string

get_replacement($i) 
inherited

Arguments

$i

Callback to add an entry to the link index

linkref_addindex($matches) 
inherited

Arguments

$matches

Callback to replace link references with real links

linkref_callback($matches) 
inherited

Arguments

$matches

Look up the index from the preg_replace matches array and return the substitution value.

replace_callback($matches) : string
inherited

Arguments

$matches

Response

string

Value at index $matches[1]

Replace all defined (link|mailto) patterns with replacement string

replace(string $str) : string
inherited

Arguments

$str

string

Text

Response

string

Text

Replace substituted strings with original values

resolve($str) 
inherited

Arguments

$str

Fixes bracket characters in URL handling

parse_url_brackets(&$url) 
inherited static

Arguments

$url

Properties

pattern

pattern : 
inherited static

mailto_pattern

mailto_pattern : 
inherited

linkref_index

linkref_index : 
inherited

linkref_pattern

linkref_pattern : 
inherited

values

values : 
inherited

options

options : 
inherited

linkrefs

linkrefs : 
inherited

urls

urls : 
inherited