mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 05:37:49 +02:00
[3.0.0] Convert all $context calls away from references
- Update TODO list - URISchemeRegistry doesn't return a reference for instance anymore, should do the same for other singletons git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1477 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -16,7 +16,7 @@ abstract class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Strategy
|
||||
|
||||
abstract public function __construct();
|
||||
|
||||
public function execute($tokens, $config, &$context) {
|
||||
public function execute($tokens, $config, $context) {
|
||||
foreach ($this->strategies as $strategy) {
|
||||
$tokens = $strategy->execute($tokens, $config, $context);
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ require_once 'HTMLPurifier/HTMLDefinition.php';
|
||||
class HTMLPurifier_Strategy_FixNesting extends HTMLPurifier_Strategy
|
||||
{
|
||||
|
||||
public function execute($tokens, $config, &$context) {
|
||||
public function execute($tokens, $config, $context) {
|
||||
//####################################################################//
|
||||
// Pre-processing
|
||||
|
||||
|
@@ -31,7 +31,7 @@ class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy
|
||||
protected $inputTokens, $inputIndex, $outputTokens, $currentNesting,
|
||||
$currentInjector, $injectors;
|
||||
|
||||
public function execute($tokens, $config, &$context) {
|
||||
public function execute($tokens, $config, $context) {
|
||||
|
||||
$definition = $config->getHTMLDefinition();
|
||||
|
||||
@@ -280,7 +280,7 @@ class HTMLPurifier_Strategy_MakeWellFormed extends HTMLPurifier_Strategy
|
||||
return $result;
|
||||
}
|
||||
|
||||
function processToken($token, $config, &$context) {
|
||||
function processToken($token, $config, $context) {
|
||||
if (is_array($token)) {
|
||||
// the original token was overloaded by an injector, time
|
||||
// to some fancy acrobatics
|
||||
|
@@ -55,7 +55,7 @@ HTMLPurifier_ConfigSchema::define(
|
||||
class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy
|
||||
{
|
||||
|
||||
public function execute($tokens, $config, &$context) {
|
||||
public function execute($tokens, $config, $context) {
|
||||
$definition = $config->getHTMLDefinition();
|
||||
$generator = new HTMLPurifier_Generator();
|
||||
$result = array();
|
||||
|
@@ -13,7 +13,7 @@ require_once 'HTMLPurifier/AttrValidator.php';
|
||||
class HTMLPurifier_Strategy_ValidateAttributes extends HTMLPurifier_Strategy
|
||||
{
|
||||
|
||||
public function execute($tokens, $config, &$context) {
|
||||
public function execute($tokens, $config, $context) {
|
||||
|
||||
// setup validator
|
||||
$validator = new HTMLPurifier_AttrValidator();
|
||||
|
Reference in New Issue
Block a user