4 * Validator for the components of a URI for a specific scheme
6 class HTMLPurifier_URIScheme
10 * Scheme's default port (integer)
13 var $default_port = null;
16 * Whether or not URIs of this schem are locatable by a browser
17 * http and ftp are accessible, while mailto and news are not.
20 var $browsable = false;
23 * Whether or not the URI always uses <hier_part>, resolves edge cases
24 * with making relative URIs absolute
26 var $hierarchical = false;
29 * Validates the components of a URI
30 * @note This implementation should be called by children if they define
31 * a default port, as it does port processing.
32 * @param $uri Instance of HTMLPurifier_URI
33 * @param $config HTMLPurifier_Config object
34 * @param $context HTMLPurifier_Context object
35 * @return Bool success or failure
37 function validate(&$uri, $config, &$context) {
38 if ($this->default_port
== $uri->port
) $uri->port
= null;