protected function createTemplate($class = NULL)
 {
     $template = parent::createTemplate($class);
     if (class_exists('\\Texy')) {
         $texy = new \Texy();
         $template->registerHelper('texy', callback($texy, 'process'));
     } else {
         $template->registerHelper('texy', function ($string) {
             return $string;
         });
     }
     return $template;
 }