예제 #1
0
 /**
  * Render the Mustache template
  * @param array $scope (optional) The scope to start working from on the parameters.
  * @return string Returns the parsed template
  * @since 1.0-sofia
  */
 public function render($scope = array())
 {
     $this->loadParameters();
     $tokenizer = new Tokenizer();
     $tokenizer->changeDelimiters($this->openDelimiter, $this->closeDelimiter);
     $tokens = $tokenizer->parse($this->template);
     $this->line = 1;
     $buffer = $this->parse($scope, $tokens);
     return $buffer;
 }