code: protected function transformTemplate(Template $template)
      {
          return array(
              'template' => $template->getTemplate(),
              'engine' => $template->getEngine(),
              'vars' => $this->transform($template->getVars()),
              'streamable' => $this->transformBoolean($template->isStreamable()),
          );
      }
docs: Transform Template Symfony annotation into array equivalent
  
  @param Template $template
  @return array