Exemplo n.º 1
0
 public function __construct($options = array())
 {
     $defaults = array("templatePath" => ".", "templateExtension" => "mustache", "cacheDir" => null, "raiseOnContextMiss" => false, "context" => null, "enableCache" => false, "disableObjects" => false, "partials" => array(), "compilerOptions" => array());
     $options = array_merge($defaults, $options);
     object_set_options($this, $options, array_keys($defaults));
     if ($this->cacheDir == null) {
         $this->cacheDir = $this->templatePath . "/.proust_cache";
     }
     if ($this->enableCache) {
         $this->ensureCacheDirectoryExists();
     }
 }
Exemplo n.º 2
0
 public function __construct(array $options = array())
 {
     $this->options = array_merge(self::$defaults, $options);
     object_set_options($this, $this->options, array_keys($options));
 }