Moodle  2.2.1
http://www.collinsharper.com
filter_urltolink Class Reference
Inheritance diagram for filter_urltolink:
Collaboration diagram for filter_urltolink:

Public Member Functions

 filter ($text, array $options=array())

Protected Member Functions

 get_global_config ($name=null)
 load_global_config ()
 convert_urls_into_links (&$text)

Static Protected Attributes

static $globalconfig

Detailed Description

Definition at line 29 of file filter.php.


Member Function Documentation

convert_urls_into_links ( &$  text) [protected]

Given some text this function converts any URLs it finds into HTML links

Parameters:
string$textPassed in by reference. The string to be searched for urls.

Reversed so "progressive" str_replace() will solve some nesting problems.

Reimplemented in testable_filter_urltolink.

Definition at line 103 of file filter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

array global configuration for this filter ( text,
array options = array() 
)

Apply the filter to the text

See also:
filter_manager::apply_filter_chain()
Parameters:
string$textto be processed by the text
array$optionsfilter options
Returns:
string text after processing

This might be eventually moved into parent class if we found it useful for other filters, too.

Reimplemented from moodle_text_filter.

Definition at line 47 of file filter.php.

Here is the call graph for this function:

get_global_config ( name = null) [protected]

Returns the global filter setting

If the $name is provided, returns single value. Otherwise returns all global settings in object. Returns null if the named setting is not found.

Parameters:
mixed$nameoptional config variable name, defaults to null for all
Returns:
string|object|null

Definition at line 74 of file filter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load_global_config ( ) [protected]

Makes sure that the global config is loaded in $this->globalconfig

Returns:
void

Definition at line 92 of file filter.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$globalconfig [static, protected]

Definition at line 37 of file filter.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations