1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Better enforcement of Singleton-ness, by requiring a setup() call after instantiation.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@121 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-07-24 11:35:46 +00:00
parent a55906225a
commit 7a9d39ddcc
2 changed files with 12 additions and 8 deletions

View File

@@ -37,16 +37,14 @@ class HTMLPurifier_Definition
static $instance = null;
if (!$instance) {
$instance = new HTMLPurifier_Definition();
$instance->setup();
}
return $instance;
}
function HTMLPurifier_Definition() {
$this->generator = new HTMLPurifier_Generator();
$this->loadData();
}
function HTMLPurifier_Definition() {}
function loadData() {
function setup() {
// emulates the structure of the DTD
// entities: prefixed with e_ and _ replaces .