Ejemplo n.º 1
0
 public function __construct(Environment $env, $templateName)
 {
     $this->templateName = $templateName;
     $this->baseClass = $env->getOption('template_base_class');
     $className = $env->getTemplateClassName($templateName);
     $classNameOffset = strrpos($className, '\\');
     if ($classNameOffset === false) {
         $this->namespace = '';
         $this->className = $className;
     } else {
         $this->namespace = substr($className, 0, $classNameOffset);
         $this->className = substr($className, $classNameOffset + 1);
     }
 }