Controller/SEOController.php
public function bingVerifAction()
    {
        if ( !$this->getConfigResolver()->hasParameter( 'bing_verification', 'nova_ezseo' ) )
        {
            throw new NotFoundHttpException( "Bing Verification Key not found" );
        }

        $key = $this->getConfigResolver()->getParameter( 'bing_verification', 'nova_ezseo' );

        $xml = new DOMDocument("1.0", "UTF-8");
        $xml->formatOutput = true;

        $root = $xml->createElement("users");
        $root->appendChild($xml->createElement("user", $key));
        $xml->appendChild($root);

        $response = new Response($xml->saveXML());
        $response->setSharedMaxAge( 24 * 3600 );
        $response->headers->set("Content-Type", "text/xml");
        return $response;
    }
public function bingVerifAction()
    {
        if ( !$this->getConfigResolver()->hasParameter( 'bing_verification', 'nova_ezseo' ) )
        {
            throw new NotFoundHttpException( "Bing Verification Key not found" );
        }

        $key = $this->getConfigResolver()->getParameter( 'bing_verification', 'nova_ezseo' );

        $xml = new DOMDocument("1.0", "UTF-8");
        $xml->formatOutput = true;

        $root = $xml->createElement("users");
        $root->appendChild($xml->createElement("user", $key));
        $xml->appendChild($root);

        $response = new Response($xml->saveXML());
        $response->setSharedMaxAge( 24 * 3600 );
        $response->headers->set("Content-Type", "text/xml");
        return $response;
    }
public function bingVerifAction ( ) { if ( ! $ this -> getConfigResolver ( ) -> hasParameter ( 'bing_verification' , 'nova_ezseo' ) ) { throw new NotFoundHttpException ( "Bing Verification Key not found" ) ; } $ key = $ this -> getConfigResolver ( ) -> getParameter ( 'bing_verification' , 'nova_ezseo' ) ; $ xml = new DOMDocument ( "1.0" , "UTF-8" ) ; $ xml -> formatOutput = true ; $ root = $ xml -> createElement ( "users" ) ; $ root -> appendChild ( $ xml -> createElement ( "user" , $ key ) ) ; $ xml -> appendChild ( $ root ) ; $ response = new Response ( $ xml -> saveXML ( ) ) ; $ response -> setSharedMaxAge ( 24 * 3600 ) ; $ response -> headers -> set ( "Content-Type" , "text/xml" ) ; return $ response ; }
Bing Verification route

@Route("/BingSiteAuth.xml")
@Method("GET")
@throws NotFoundHttpException
@return Response
Bing Verification route