Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / URIScheme.php
blob20a9781b487d62a5d5552eb259b18d26e47da5df
1 <?php
3 /**
4 * Validator for the components of a URI for a specific scheme
5 */
6 class HTMLPurifier_URIScheme
9 /**
10 * Scheme's default port (integer)
11 * @public
13 var $default_port = null;
15 /**
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.
18 * @public
20 var $browsable = false;
22 /**
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
37 ) {
38 if ($this->default_port == $port) $port = null;
39 return array($userinfo, $host, $port, $path, $query);