setPaths($paths); } $this->phpbb_locator = $phpbb_locator; } protected function findTemplate($name) { $name = (string) $name; if (!$name) { throw new Twig_Error_Loader(sprintf('Unable to find template "%s".', $name)); } $this->phpbb_locator->set_filenames(array( 'temp' => $name, )); $location = $this->phpbb_locator->get_source_file_for_handle('temp'); if (!$location) { throw new Twig_Error_Loader(sprintf('Unable to find template "%s".', $name)); } return $this->cache[$name] = $location; } }