1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-12 00:54:48 +02:00

__construct'ify all main library classes.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1459 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-11-29 04:29:51 +00:00
parent 43f01925cd
commit 3ef9bdf8a2
67 changed files with 75 additions and 74 deletions

View File

@@ -62,7 +62,7 @@ class HTMLPurifier_Token_Tag extends HTMLPurifier_Token // abstract
* @param $name String name.
* @param $attr Associative array of attributes.
*/
public function HTMLPurifier_Token_Tag($name, $attr = array(), $line = null) {
public function __construct($name, $attr = array(), $line = null) {
$this->name = ctype_lower($name) ? $name : strtolower($name);
foreach ($attr as $key => $value) {
// normalization only necessary when key is not lowercase
@@ -131,7 +131,7 @@ class HTMLPurifier_Token_Text extends HTMLPurifier_Token
*
* @param $data String parsed character data.
*/
public function HTMLPurifier_Token_Text($data, $line = null) {
public function __construct($data, $line = null) {
$this->data = $data;
$this->is_whitespace = ctype_space($data);
$this->line = $line;
@@ -151,7 +151,7 @@ class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
*
* @param $data String comment data.
*/
public function HTMLPurifier_Token_Comment($data, $line = null) {
public function __construct($data, $line = null) {
$this->data = $data;
$this->line = $line;
}