1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 05:07:55 +02:00

[3.1.0] More PHP4->PHP5 conversions, notably reference removal of most methods that return objects

- Removed HTMLPurifier_Error
- Documentation updates
- Removed more copy() methods in favor of clone
- HTMLPurifier::getInstance() to HTMLPurifier::instance()
- Fix InterchangeBuilder to use HTMLPURIFIER_PREFIX

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1689 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-23 02:40:17 +00:00
parent 893cdd0301
commit eaabccdd9b
49 changed files with 237 additions and 210 deletions

View File

@@ -1,5 +1,9 @@
<?php
/**
* Represents a language and defines localizable string formatting and
* other functions, as well as the localized messages for HTML Purifier.
*/
class HTMLPurifier_Language
{
@@ -36,7 +40,7 @@ class HTMLPurifier_Language
public function __construct($config, $context) {
$this->config = $config;
$this->context =& $context;
$this->context = $context;
}
/**
@@ -122,7 +126,7 @@ class HTMLPurifier_Language
// could be introduced for all types of tokens. This
// may need to be factored out into a dedicated class
if (!empty($value->attr)) {
$stripped_token = $value->copy();
$stripped_token = clone $value;
$stripped_token->attr = array();
$subst['$'.$i.'.Compact'] = $generator->generateFromToken($stripped_token);
}