<?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>
        <!-- View Factory -->
        <parameter key="white_october_pagerfanta.view_factory.class">Pagerfanta\View\ViewFactory</parameter>
    </parameters>

    <services>
        <!-- View Factory -->
        <service id="white_october_pagerfanta.view_factory" class="%white_october_pagerfanta.view_factory.class%">
            <argument type="collection" />
        </service>

        <!-- "default" view -->
        <service id="pagerfanta.view.default" class="Pagerfanta\View\DefaultView" public="false">
            <tag name="pagerfanta.view" alias="default" />
        </service>

        <!-- "default_translated" view -->
        <service id="pagerfanta.view.default_translated" class="WhiteOctober\PagerfantaBundle\View\DefaultTranslatedView" public="false">
            <tag name="pagerfanta.view" alias="default_translated" />
            <argument type="service" id="pagerfanta.view.default" />
            <argument type="service" id="translator" />
        </service>

        <!-- "twitter_bootstrap" view -->
        <service id="pagerfanta.view.twitter_bootstrap" class="Pagerfanta\View\TwitterBootstrapView" public="false">
            <tag name="pagerfanta.view" alias="twitter_bootstrap" />
        </service>

        <!-- "twitter_bootstrap3" view -->
        <service id="pagerfanta.view.twitter_bootstrap3" class="Pagerfanta\View\TwitterBootstrap3View" public="false">
            <tag name="pagerfanta.view" alias="twitter_bootstrap3" />
        </service>

        <!-- "twitter_bootstrap3_translated" view -->
        <service id="pagerfanta.view.twitter_bootstrap3_translated" class="WhiteOctober\PagerfantaBundle\View\TwitterBootstrap3TranslatedView" public="false">
            <tag name="pagerfanta.view" alias="twitter_bootstrap3_translated" />
            <argument type="service" id="pagerfanta.view.twitter_bootstrap3" />
            <argument type="service" id="translator" />
        </service>


        <!-- "twitter_bootstrap_translated" view -->
        <service id="pagerfanta.view.twitter_bootstrap_translated" class="WhiteOctober\PagerfantaBundle\View\TwitterBootstrapTranslatedView" public="false">
            <tag name="pagerfanta.view" alias="twitter_bootstrap_translated" />
            <argument type="service" id="pagerfanta.view.twitter_bootstrap" />
            <argument type="service" id="translator" />
        </service>

        <!-- Twig Extension -->
        <service id="twig.extension.pagerfanta" class="WhiteOctober\PagerfantaBundle\Twig\PagerfantaExtension" public="false">
            <tag name="twig.extension" />
            <argument type="service" id="service_container" />
        </service>

        <service id="pagerfanta.convert_not_valid_max_per_page_to_not_found_listener" class="WhiteOctober\PagerfantaBundle\EventListener\ConvertNotValidMaxPerPageToNotFoundListener">
            <!-- subscribe tag is added in the extension if convert_not_valid_max_per_page_to_not_found options set to true -->
        </service>

        <service id="pagerfanta.convert_not_valid_current_page_to_not_found_listener" class="WhiteOctober\PagerfantaBundle\EventListener\ConvertNotValidCurrentPageToNotFoundListener">
            <!-- subscribe tag is added in the extension if convert_not_valid_current_page_to_not_found options set to true -->
        </service>
    </services>

</container>
