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