public function getSourceContext($name) : Source
    {
        if (!$this->exists($name)) {
            throw new LoaderError(sprintf(
                'Unable to find template "%s" from template map',
                $name
            ));
        }

        if (!file_exists($this->map[$name])) {
            throw new LoaderError(sprintf(
                'Unable to open file "%s" from template map',
                $this->map[$name]
            ));
        }

        $content = file_get_contents($this->map[$name]);
        $source = new Source($content, $name, $this->map[$name]);

        return $source;
    }