services:
    _defaults:
        autowire: true
        autoconfigure: true

    chill_main.paginator_factory:
        class: Chill\MainBundle\Pagination\PaginatorFactory
        public: true
        arguments:
            - "@request_stack"
            - "@router"
            - "%chill_main.pagination.item_per_page%"

    Chill\MainBundle\Pagination\PaginatorFactory: '@chill_main.paginator_factory'
    Chill\MainBundle\Pagination\PaginatorFactoryInterface: '@chill_main.paginator_factory'

    chill_main.paginator.twig_extensions:
        class: Chill\MainBundle\Pagination\ChillPaginationTwig
        tags:
            - { name: twig.extension }

    chill_main.paginator.items_per_page.twig_extensions:
        class: Chill\MainBundle\Pagination\ChillItemsPerPageTwig
        tags:
            - { name: twig.extension }
