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 * Validates the components of a URI
24 * @note This implementation should be called by children if they define
25 * a default port, as it does port processing.
26 * @note Fragment is omitted as that is scheme independent
27 * @param $userinfo User info found before at sign in authority
28 * @param $host Hostname in authority
29 * @param $port Port found after colon in authority
30 * @param $path Path of URI
31 * @param $query Query of URI, found after question mark
32 * @param $config HTMLPurifier_Config object
33 * @param $context HTMLPurifier_Context object
35 function validateComponents(
36 $userinfo, $host, $port, $path, $query, $config, &$context
38 if ($this->default_port
== $port) $port = null;
39 return array($userinfo, $host, $port, $path, $query);