ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
EntityLookup.php
Go to the documentation of this file.
1 <?php
2 
7 {
12  public $table;
13 
21  public function setup($file = false)
22  {
23  if (!$file) {
24  $file = HTMLPURIFIER_PREFIX . '/HTMLPurifier/EntityLookup/entities.ser';
25  }
26  $this->table = unserialize(file_get_contents($file));
27  }
28 
34  public static function instance($prototype = false)
35  {
36  // no references, since PHP doesn't copy unless modified
37  static $instance = null;
38  if ($prototype) {
39  $instance = $prototype;
40  } elseif (!$instance) {
41  $instance = new HTMLPurifier_EntityLookup();
42  $instance->setup();
43  }
44  return $instance;
45  }
46 }
47 
48 // vim: et sw=4 sts=4