mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
5ce0ae7056
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@105 48356398-32a2-884e-a903-53898d9a118a
25 lines
553 B
PHP
25 lines
553 B
PHP
<?php
|
|
|
|
class HTMLPurifier_EntityLookup {
|
|
|
|
var $table;
|
|
|
|
function HTMLPurifier_EntityLookup($file = false) {
|
|
if (!$file) {
|
|
$file = dirname(__FILE__) . '/EntityLookup/data.txt';
|
|
}
|
|
$this->table = unserialize(file_get_contents($file));
|
|
}
|
|
|
|
function instance() {
|
|
// no references, since PHP doesn't copy unless modified
|
|
static $instance = null;
|
|
if (!$instance) {
|
|
$instance = new HTMLPurifier_EntityLookup();
|
|
}
|
|
return $instance;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|