API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_URI Class Reference

Public Member Functions

 __construct ($scheme, $userinfo, $host, $port, $path, $query, $fragment)
 
 getSchemeObj ($config, $context)
 
 validate ($config, $context)
 
 toString ()
 
 isLocal ($config, $context)
 
 isBenign ($config, $context)
 

Data Fields

 $scheme
 
 $userinfo
 
 $host
 
 $port
 
 $path
 
 $query
 
 $fragment
 

Detailed Description

HTML Purifier's internal representation of a URI.

Note
Internal data-structures are completely escaped. If the data needs to be used in a non-URI context (which is very unlikely), be sure to decode it first. The URI may not necessarily be well-formed until validate() is called.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $scheme,
  $userinfo,
  $host,
  $port,
  $path,
  $query,
  $fragment 
)
Parameters
string$scheme
string$userinfo
string$host
int$port
string$path
string$query
string$fragment
Note
Automatically normalizes scheme and port

Member Function Documentation

◆ getSchemeObj()

getSchemeObj (   $config,
  $context 
)

Retrieves a scheme object corresponding to the URI's scheme/default

Parameters
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
HTMLPurifier_URIScheme Scheme object appropriate for validating this URI
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isBenign()

isBenign (   $config,
  $context 
)

Returns true if this URL should be considered a 'benign' URL, that is:

 - It is a local URL (isLocal), and
 - It has a equal or better level of security
Parameters
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
bool
Here is the call graph for this function:

◆ isLocal()

isLocal (   $config,
  $context 
)

Returns true if this URL might be considered a 'local' URL given the current context. This is true when the host is null, or when it matches the host supplied to the configuration.

Note that this does not do any scheme checking, so it is mostly only appropriate for metadata that doesn't care about protocol security. isBenign is probably what you actually want.

Parameters
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
bool
Here is the caller graph for this function:

◆ toString()

toString ( )

Convert URI back to string

Returns
string URI appropriate for output

◆ validate()

validate (   $config,
  $context 
)

Generic validation method applicable for all schemes. May modify this URI in order to get it into a compliant form.

Parameters
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
bool True if validation/filtering succeeds, false if failure

Field Documentation

◆ $fragment

$fragment

@type string

◆ $host

$host

@type string

◆ $path

$path

@type string

◆ $port

$port

@type int

◆ $query

$query

@type string

◆ $scheme

$scheme

@type string

◆ $userinfo

$userinfo

@type string


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