<?xml version="1.0" encoding="UTF-8" ?>

<!--
 This file is part of the FOSCommentBundle package.

 (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>

 This source file is subject to the MIT license that is bundled
 with this source code in the file LICENSE.
-->

<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_comment.sorting_factory.class">FOS\CommentBundle\Sorting\SortingFactory</parameter>
        <parameter key="fos_comment.sorter.date.class">FOS\CommentBundle\Sorting\DateSorting</parameter>
    </parameters>

    <services>
        <service id="fos_comment.sorter.date_asc" class="%fos_comment.sorter.date.class%" public="false">
            <tag name="fos_comment.sorter" alias="date_asc" />
            <argument>ASC</argument>
        </service>

        <service id="fos_comment.sorter.date_desc" class="%fos_comment.sorter.date.class%" public="false">
            <tag name="fos_comment.sorter" alias="date_desc" />
            <argument>DESC</argument>
        </service>

        <service id="fos_comment.sorting_factory" class="%fos_comment.sorting_factory.class%">
            <argument type="collection" />
            <argument>%fos_comment.sorting_factory.default_sorter%</argument>
        </service>
    </services>
</container>
