Fixed initialization for template and partials to avoid thunking defaults added by subclasses.
This commit is contained in:
+6
-9
@@ -18,9 +18,9 @@ class Mustache {
|
|||||||
public $ctag = '}}';
|
public $ctag = '}}';
|
||||||
protected $tagRegEx;
|
protected $tagRegEx;
|
||||||
|
|
||||||
protected $template;
|
protected $template = '';
|
||||||
protected $context;
|
protected $context = array();
|
||||||
protected $partials;
|
protected $partials = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mustache class constructor.
|
* Mustache class constructor.
|
||||||
@@ -35,12 +35,9 @@ class Mustache {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct($template = null, $view = null, $partials = null) {
|
public function __construct($template = null, $view = null, $partials = null) {
|
||||||
$this->template = $template;
|
if ($template !== null) $this->template = $template;
|
||||||
$this->partials = $partials;
|
if ($partials !== null) $this->partials = $partials;
|
||||||
|
if ($view !== null) $this->context = array($view);
|
||||||
if ($view) {
|
|
||||||
$this->context = array($view);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user