<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>

        <parameter key="fos_rest.access_denied_listener.class">FOS\RestBundle\EventListener\AccessDeniedListener</parameter>
        <parameter key="fos_rest.access_denied_listener.formats" type="collection"/>
        <parameter key="fos_rest.access_denied_listener.unauthorized_challenge" type="string" />

    </parameters>

    <services>

        <service id="fos_rest.access_denied_listener" class="%fos_rest.access_denied_listener.class%">
            <tag name="kernel.event_subscriber" />
            <tag name="monolog.logger" channel="request" />
            <argument>%fos_rest.access_denied_listener.formats%</argument>
            <argument>%fos_rest.access_denied_listener.unauthorized_challenge%</argument>
            <argument>%twig.exception_listener.controller%</argument>
            <argument type="service" id="logger" on-invalid="null" />
        </service>

    </services>
</container>
                                                                                                                                                                                                                                                                                                                                                         <?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="fos_rest.format_negotiator.class">FOS\RestBundle\Util\FormatNegotiator</parameter>
        <parameter key="fos_rest.inflector.class">FOS\RestBundle\Util\Inflector\DoctrineInflector</parameter>
        <parameter key="fos_rest.request_matcher.class">Symfony\Component\HttpFoundation\RequestMatcher</parameter>
        <parameter key="fos_rest.violation_formatter.class">FOS\RestBundle\Util\ViolationFormatter</parameter>
    </parameters>

    <services>
        <service id="fos_rest.format_negotiator" class="%fos_rest.format_negotiator.class%" />
        <service id="fos_rest.inflector.doctrine" class="%fos_rest.inflector.class%" />
        <service id="fos_rest.request_matcher" class="%fos_rest.request_matcher.class%" public="false" />
        <service id="fos_rest.violation_formatter" class="%fos_rest.violation_formatter.class%" />
    </services>
</container>
