\HTMLPurifier_URIScheme_file

Validates file as defined by RFC 1630 and RFC 1738.

Summary

Methods
Properties
Constants
doValidate()
validate()
$default_port
$browsable
$secure
$hierarchical
$may_omit_host
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$default_port

$default_port : 

Scheme's default port (integer). If an explicit port number is specified that coincides with the default port, it will be elided.

Type

$browsable

$browsable : 

Generally file:// URLs are not accessible from most machines, so placing them as an img src is incorrect.

Type

$secure

$secure : 

Whether or not data transmitted over this scheme is encrypted.

https is secure, http is not.

Type

$hierarchical

$hierarchical : 

Whether or not the URI always uses <hier_part>, resolves edge cases with making relative URIs absolute

Type

$may_omit_host

$may_omit_host : 

Basically the *only* URI scheme for which this is true, since accessing files on the local machine is very common. In fact, browsers on some operating systems don't understand the authority, though I hear it is used on Windows to refer to network shares.

Type

Methods

doValidate()

doValidate(\HTMLPurifier_URI  $uri, \HTMLPurifier_Config  $config, \HTMLPurifier_Context  $context) : boolean

Validates the components of a URI for a specific scheme.

Parameters

\HTMLPurifier_URI $uri

Reference to a HTMLPurifier_URI object

\HTMLPurifier_Config $config
\HTMLPurifier_Context $context

Returns

boolean

validate()

validate(\HTMLPurifier_URI  $uri, \HTMLPurifier_Config  $config, \HTMLPurifier_Context  $context) : boolean

Public interface for validating components of a URI. Performs a bunch of default actions. Don't overload this method.

Parameters

\HTMLPurifier_URI $uri

Reference to a HTMLPurifier_URI object

\HTMLPurifier_Config $config
\HTMLPurifier_Context $context

Returns

boolean —

success or failure