MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / lib / htmlpurifier / HTMLPurifier / Strategy / Composite.php
blobfcd230f47235da28989779b6f188d4361a8c26b9
1 <?php
3 require_once 'HTMLPurifier/Strategy.php';
4 require_once 'HTMLPurifier/Config.php';
6 /**
7 * Composite strategy that runs multiple strategies on tokens.
8 */
9 class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Strategy
12 /**
13 * List of strategies to run tokens through.
15 var $strategies = array();
17 function HTMLPurifier_Strategy_Composite() {
18 trigger_error('Attempt to instantiate abstract object', E_USER_ERROR);
21 function execute($tokens, $config, &$context) {
22 foreach ($this->strategies as $strategy) {
23 $tokens = $strategy->execute($tokens, $config, $context);
25 return $tokens;