Strategy.php 762 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Supertype for classes that define a strategy for modifying/purifying tokens.
  4. *
  5. * While HTMLPurifier's core purpose is fixing HTML into something proper,
  6. * strategies provide plug points for extra configuration or even extra
  7. * features, such as custom tags, custom parsing of text, etc.
  8. */
  9. abstract class HTMLPurifier_Strategy
  10. {
  11. /**
  12. * Executes the strategy on the tokens.
  13. *
  14. * @param HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token objects to be operated on.
  15. * @param HTMLPurifier_Config $config
  16. * @param HTMLPurifier_Context $context
  17. * @return HTMLPurifier_Token[] Processed array of token objects.
  18. */
  19. abstract public function execute($tokens, $config, $context);
  20. }
  21. // vim: et sw=4 sts=4