3 declare(strict_types
=1);
5 namespace Shaarli\Front\Controller\Visitor
;
8 use Slim\Http\Response
;
11 * Class OpenSearchController
13 * Slim controller used to render open search template.
14 * This allows to add Shaarli as a search engine within the browser.
16 class OpenSearchController
extends ShaarliVisitorController
18 public function index(Request
$request, Response
$response): Response
20 $response = $response->withHeader('Content-Type', 'application/opensearchdescription+xml; charset=utf-8');
22 $this->assignView('serverurl', index_url($this->container
->environment
));
24 return $response->write($this->render('opensearch'));