ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HTMLPurifier_URIDefinition Class Reference
+ Inheritance diagram for HTMLPurifier_URIDefinition:
+ Collaboration diagram for HTMLPurifier_URIDefinition:

Public Member Functions

 __construct ()
 registerFilter ($filter)
 addFilter ($filter, $config)
 filter (&$uri, $config, $context)
 postFilter (&$uri, $config, $context)
- Public Member Functions inherited from HTMLPurifier_Definition
 setup ($config)
 Setup function that aborts if already setup.

Data Fields

 $type = 'URI'
 $base
 HTMLPurifier_URI object of the base specified at URI.Base.
 $host
 String host to consider "home" base, derived off of $base.
 $defaultScheme
 Name of default scheme based on URI.DefaultScheme and URI.Base.
- Data Fields inherited from HTMLPurifier_Definition
 $setup = false
 Has setup() been called yet?
 $type
 What type of definition is it?

Protected Member Functions

 doSetup ($config)
 Sets up the definition object into the final form, something not done by the constructor.
 setupFilters ($config)
 setupMemberVariables ($config)

Protected Attributes

 $filters = array()
 $postFilters = array()
 $registeredFilters = array()

Detailed Description

Definition at line 3 of file URIDefinition.php.

Constructor & Destructor Documentation

HTMLPurifier_URIDefinition::__construct ( )

Member Function Documentation

HTMLPurifier_URIDefinition::addFilter (   $filter,
  $config 
)

Definition at line 38 of file URIDefinition.php.

References $config, and $filter.

Referenced by setupFilters().

{
$r = $filter->prepare($config);
if ($r === false) return; // null is ok, for backwards compat
if ($filter->post) {
$this->postFilters[$filter->name] = $filter;
} else {
$this->filters[$filter->name] = $filter;
}
}

+ Here is the caller graph for this function:

HTMLPurifier_URIDefinition::doSetup (   $config)
protected

Sets up the definition object into the final form, something not done by the constructor.

Parameters
$configHTMLPurifier_Config instance

Reimplemented from HTMLPurifier_Definition.

Definition at line 48 of file URIDefinition.php.

References $config, setupFilters(), and setupMemberVariables().

+ Here is the call graph for this function:

HTMLPurifier_URIDefinition::filter ( $uri,
  $config,
  $context 
)

Definition at line 75 of file URIDefinition.php.

References $config, $f, $name, and $result.

{
foreach ($this->filters as $name => $f) {
$result = $f->filter($uri, $config, $context);
if (!$result) return false;
}
return true;
}
HTMLPurifier_URIDefinition::postFilter ( $uri,
  $config,
  $context 
)

Definition at line 83 of file URIDefinition.php.

References $config, $f, $name, and $result.

{
foreach ($this->postFilters as $name => $f) {
$result = $f->filter($uri, $config, $context);
if (!$result) return false;
}
return true;
}
HTMLPurifier_URIDefinition::registerFilter (   $filter)

Definition at line 34 of file URIDefinition.php.

References $filter.

Referenced by __construct().

{
$this->registeredFilters[$filter->name] = $filter;
}

+ Here is the caller graph for this function:

HTMLPurifier_URIDefinition::setupFilters (   $config)
protected

Definition at line 53 of file URIDefinition.php.

References $config, $filter, $name, and addFilter().

Referenced by doSetup().

{
foreach ($this->registeredFilters as $name => $filter) {
$conf = $config->get('URI.' . $name);
if ($conf !== false && $conf !== null) {
}
}
unset($this->registeredFilters);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

HTMLPurifier_URIDefinition::setupMemberVariables (   $config)
protected

Definition at line 63 of file URIDefinition.php.

References $config.

Referenced by doSetup().

{
$this->host = $config->get('URI.Host');
$base_uri = $config->get('URI.Base');
if (!is_null($base_uri)) {
$parser = new HTMLPurifier_URIParser();
$this->base = $parser->parse($base_uri);
$this->defaultScheme = $this->base->scheme;
if (is_null($this->host)) $this->host = $this->base->host;
}
if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get('URI.DefaultScheme');
}

+ Here is the caller graph for this function:

Field Documentation

HTMLPurifier_URIDefinition::$base

HTMLPurifier_URI object of the base specified at URI.Base.

Definition at line 14 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$defaultScheme

Name of default scheme based on URI.DefaultScheme and URI.Base.

Definition at line 24 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$filters = array()
protected

Definition at line 7 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$host

String host to consider "home" base, derived off of $base.

Definition at line 19 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$postFilters = array()
protected

Definition at line 8 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$registeredFilters = array()
protected

Definition at line 9 of file URIDefinition.php.

HTMLPurifier_URIDefinition::$type = 'URI'

Definition at line 6 of file URIDefinition.php.


The documentation for this class was generated from the following file: