Empty.php 866 B

123456789101112131415161718192021222324252627282930313233343536373839
  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