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:
@@ -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 .
|
||||
|
Reference in New Issue
Block a user