PageRenderTime 48ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/htmlpurifier/HTMLPurifier/ChildDef/Empty.php

https://bitbucket.org/moodle/moodle
PHP | 38 lines | 13 code | 5 blank | 20 comment | 0 complexity | ff694dc713c2f26d7099f3d8880f16d4 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1, BSD-3-Clause, MIT, GPL-3.0
  1. <?php
  2. /**
  3. * Definition that disallows all elements.
  4. * @warning validateChildren() in this class is actually never called, because
  5. * empty elements are corrected in HTMLPurifier_Strategy_MakeWellFormed
  6. * before child definitions are parsed in earnest by
  7. * HTMLPurifier_Strategy_FixNesting.
  8. */
  9. class HTMLPurifier_ChildDef_Empty extends HTMLPurifier_ChildDef
  10. {
  11. /**
  12. * @type bool
  13. */
  14. public $allow_empty = true;
  15. /**
  16. * @type string
  17. */
  18. public $type = 'empty';
  19. public function __construct()
  20. {
  21. }
  22. /**
  23. * @param HTMLPurifier_Node[] $children
  24. * @param HTMLPurifier_Config $config
  25. * @param HTMLPurifier_Context $context
  26. * @return array
  27. */
  28. public function validateChildren($children, $config, $context)
  29. {
  30. return array();
  31. }
  32. }
  33. // vim: et sw=4 sts=4