setup() public method

Sets up the singleton, much like a constructor
public setup ( )
Esempio n. 1
0
 /**
  * Retrieve sole instance of the factory.
  * @static
  * @param $prototype Optional prototype to overload sole instance with,
  *                   or bool true to reset to default factory.
  */
 static function &instance($prototype = null)
 {
     static $instance = null;
     if ($prototype !== null) {
         $instance = $prototype;
     } elseif ($instance === null || $prototype == true) {
         $instance = new HTMLPurifier_LanguageFactory();
         $instance->setup();
     }
     return $instance;
 }