analytics['google_site_verifications_file'] ?? [] as $value) { if ($value['value'] == $hash) { return new Response("google-site-verification: google{$hash}.html"); } } throw new NotFoundHttpException('Not found'); } /** * @Route(path="/{hash}.html", name="facebook_claim_verify", requirements={"hash"="^[a-zA-Z0-9]{30}$"}) * * @return Response */ public function getFacebookWebVerify(Request $request, $hash) { $dbcfg = \Settings::getDefault(); foreach ($dbcfg->analytics['facebook_site_verifications_file'] ?? [] as $value) { if ($value['value'] == $hash) { return new Response($hash); } } throw new NotFoundHttpException('Not found'); } /** * @Route(path="/seznam-wmt-{hash}.txt", name="seznam_claim_verify", requirements={"slug"="^[a-zA-Z0-9]{32}$"}) * * @return Response */ public function getSeznamWebVerify(Request $request, $hash) { $dbcfg = \Settings::getDefault(); foreach ($dbcfg->analytics['seznam_site_verifications_file'] ?? [] as $value) { if ($value['value'] == $hash) { return new Response($hash); } } throw new NotFoundHttpException('Not found'); } }