Release 2.1.3, merged in 1404 to HEAD.
[htmlpurifier/bfroehle.git] / library / HTMLPurifier / URIFilter.php
blobca000ea5a2a8d6d29a1089985a6494d2dd5e8e42
1 <?php
3 /**
4 * Chainable filters for custom URI processing.
5 *
6 * These filters can perform custom actions on a URI filter object,
7 * including transformation or blacklisting.
8 *
9 * @warning This filter is called before scheme object validation occurs.
10 * Make sure, if you require a specific scheme object, you
11 * you check that it exists. This allows filters to convert
12 * proprietary URI schemes into regular ones.
14 class HTMLPurifier_URIFilter
17 /**
18 * Unique identifier of filter
20 var $name;
22 /**
23 * Performs initialization for the filter
25 function prepare($config) {}
27 /**
28 * Filter a URI object
29 * @param &$uri Reference to URI object
30 * @param $config Instance of HTMLPurifier_Config
31 * @param &$context Instance of HTMLPurifier_Context
32 * @return bool Whether or not to continue processing: false indicates
33 * URL is no good, true indicates continue processing. Note that
34 * all changes are committed directly on the URI object
36 function filter(&$uri, $config, &$context) {
37 trigger_error('Cannot call abstract function', E_USER_ERROR);