2006-07-23 23:23:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Supertype for classes that define a strategy for modifying/purifying tokens.
|
2008-12-06 07:28:20 +00:00
|
|
|
*
|
|
|
|
* While HTMLPurifier's core purpose is fixing HTML into something proper,
|
2006-07-23 23:23:14 +00:00
|
|
|
* strategies provide plug points for extra configuration or even extra
|
|
|
|
* features, such as custom tags, custom parsing of text, etc.
|
|
|
|
*/
|
|
|
|
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
abstract class HTMLPurifier_Strategy
|
2006-07-23 23:23:14 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-07-23 23:23:14 +00:00
|
|
|
/**
|
|
|
|
* Executes the strategy on the tokens.
|
2008-12-06 07:28:20 +00:00
|
|
|
*
|
2006-07-23 23:23:14 +00:00
|
|
|
* @param $tokens Array of HTMLPurifier_Token objects to be operated on.
|
2006-08-04 01:47:48 +00:00
|
|
|
* @param $config Configuration options
|
2006-07-23 23:23:14 +00:00
|
|
|
* @returns Processed array of token objects.
|
|
|
|
*/
|
2008-01-05 00:10:43 +00:00
|
|
|
abstract public function execute($tokens, $config, $context);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-07-23 23:23:14 +00:00
|
|
|
}
|
|
|
|
|