private function loadTemplates(array $themes)
    {
        $templates = array();
        foreach ($themes as $theme) {
            $key = is_object($theme) ? spl_object_hash($theme) : $theme;

            if (!isset($this->templates[$key])) {
                $template = $this->twig->load($theme);

                $this->templates[$key] = $template;
            }

            $templates[] = $this->templates[$key];
        }

        return $templates;
    }