Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 38 lines (29 sloc) 829 Bytes
* (c) Christian Gripp <>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
namespace Core23\SitemapBundle\Action;
use Core23\SitemapBundle\Generator\SitemapGeneratorInterface;
use Symfony\Component\HttpFoundation\Response;
final class SitemapXMLAction
* @var SitemapGeneratorInterface
private $generator;
public function __construct(SitemapGeneratorInterface $generator)
$this->generator = $generator;
public function __invoke(): Response
$response = new Response($this->generator->toXML());
$response->headers->set('Content-Type', 'text/xml');
return $response;
You can’t perform that action at this time.