PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/moodle/lib/htmlpurifier/HTMLPurifier/URIFilter.php

https://bitbucket.org/geek745/moodle-db2
PHP | 40 lines | 9 code | 5 blank | 26 comment | 0 complexity | c06dbe279ea3c69e25544b138945d6ef MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause, LGPL-2.0
  1. <?php
  2. /**
  3. * Chainable filters for custom URI processing.
  4. *
  5. * These filters can perform custom actions on a URI filter object,
  6. * including transformation or blacklisting.
  7. *
  8. * @warning This filter is called before scheme object validation occurs.
  9. * Make sure, if you require a specific scheme object, you
  10. * you check that it exists. This allows filters to convert
  11. * proprietary URI schemes into regular ones.
  12. */
  13. class HTMLPurifier_URIFilter
  14. {
  15. /**
  16. * Unique identifier of filter
  17. */
  18. var $name;
  19. /**
  20. * Performs initialization for the filter
  21. */
  22. function prepare($config) {}
  23. /**
  24. * Filter a URI object
  25. * @param &$uri Reference to URI object
  26. * @param $config Instance of HTMLPurifier_Config
  27. * @param &$context Instance of HTMLPurifier_Context
  28. * @return bool Whether or not to continue processing: false indicates
  29. * URL is no good, true indicates continue processing. Note that
  30. * all changes are committed directly on the URI object
  31. */
  32. function filter(&$uri, $config, &$context) {
  33. trigger_error('Cannot call abstract function', E_USER_ERROR);
  34. }
  35. }