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