Strategy.php 680 B

1234567891011121314151617181920212223242526
  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 $tokens Array of HTMLPurifier_Token objects to be operated on.
  15. * @param $config Configuration options
  16. * @returns Processed array of token objects.
  17. */
  18. abstract public function execute($tokens, $config, $context);
  19. }
  20. // vim: et sw=4 sts=4