Exemplo n.º 1
0
 /**
  * returns a default instance of this compiler, used by default by all Dwoo templates that do not have a
  * specific compiler assigned and when you do not override the default compiler factory function
  *
  * @see Dwoo::setDefaultCompilerFactory()
  * @return Dwoo_Compiler
  */
 public static function compilerFactory()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  * constructor
  *
  * saves the created instance so that child templates get the same one
  */
 public function __construct()
 {
     self::$instance = $this;
 }