HTMLPurifier/EntityLookup.php Quellcode

EntityLookup.php
gehe zur Dokumentation dieser Datei
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




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.