src/Loader/MapLoader.php
public function add($name, $path) : MapLoader
    {
        if ($this->exists($name)) {
            throw new LoaderError(sprintf(
                'Name "%s" already exists in map',
                $name
            ));
        }

        $this->map[$name] = $path;

        return $this;
    }
public function add($name, $path) : MapLoader
    {
        if ($this->exists($name)) {
            throw new LoaderError(sprintf(
                'Name "%s" already exists in map',
                $name
            ));
        }

        $this->map[$name] = $path;

        return $this;
    }
Add to the map.

@param string $name
@param string $path

@throws \Twig_Error_Loader
@return MapLoader