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
|
|
|
*
|
2013-07-16 11:56:14 +00:00
|
|
|
* @param HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token objects to be operated on.
|
|
|
|
* @param HTMLPurifier_Config $config
|
|
|
|
* @param HTMLPurifier_Context $context
|
|
|
|
* @return HTMLPurifier_Token[] Processed array of token objects.
|
2006-07-23 23:23:14 +00:00
|
|
|
*/
|
2008-01-05 00:10:43 +00:00
|
|
|
abstract public function execute($tokens, $config, $context);
|
2006-07-23 23:23:14 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|