Example #1
0
 /**
  * Register a pragma for the current rendering session
  *
  * @param  array $definition
  */
 private function registerPragma(array $definition)
 {
     $pragmas = $this->mustache->getPragmas();
     $name = $definition['pragma'];
     if (!$pragmas->has($name)) {
         throw new Exception\UnregisteredPragmaException(sprintf('No handler for pragma "%s" registered; cannot proceed rendering', $name));
     }
     $this->invokedPragmas[$name] = $definition['options'];
 }