Esempio n. 1
0
 /**
  * Return the evaluated template.
  *
  * @param string $path The file name with its file extension.
  * @param array  $data Template data (view data)
  *
  * @return string
  */
 public function get($path, array $data = [])
 {
     $file = array_search($path, $this->finder->getViews());
     // Allow the use of a '.' notation.
     $file = themosis_convert_path($file);
     $template = $this->environment->loadTemplate($file . $this->extension);
     return $template->render($data);
 }