Example #1
0
 /**
  * register compiler handler
  *
  * @param string name
  * @param callback compile
  */
 public function registerCompilerHandler($type, $compile)
 {
     return $this->plugin['compiler'][$type] = XTemplaterCompiler::factory($compile);
 }
Example #2
0
 /**
  * create compiler handler
  *
  * @param callback compiler
  */
 public static function factory($compile)
 {
     $object = new XTemplaterCompiler();
     $object->setHandler('compile', $compile);
     return $object;
 }