PageRenderTime 49ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/library/HTMLPurifier/ChildDef/Empty.php

https://github.com/ezyang/htmlpurifier
PHP | 38 lines | 13 code | 5 blank | 20 comment | 0 complexity | 33457531d46c2cf60b9d74bc4a0f9818 MD5 | raw file
Possible License(s): LGPL-2.1
  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