services:
    vse.similartopics.manager:
        class: vse\similartopics\core\similar_topics
        arguments:
            - '@auth'
            - '@cache'
            - '@config'
            - '@config_text'
            - '@dbal.conn'
            - '@dispatcher'
            - '@ext.manager'
            - '@language'
            - '@pagination'
            - '@request'
            - '@template'
            - '@user'
            - '@content.visibility'
            - '@vse.similartopics.driver.manager'
            - '%core.root_path%'
            - '%core.php_ext%'

    vse.similartopics.listener:
        class: vse\similartopics\event\listener
        arguments:
            - '@vse.similartopics.manager'
        tags:
            - { name: event.listener }

    vse.similartopics.ucp_listener:
        class: vse\similartopics\event\ucp_listener
        arguments:
            - '@auth'
            - '@config'
            - '@language'
            - '@request'
            - '@template'
            - '@user'
        tags:
            - { name: event.listener }

    vse.similartopics.driver.manager:
        class: vse\similartopics\driver\manager
        arguments:
            - '@vse.similartopics.driver_collection'

    vse.similartopics.acp.controller:
        class: vse\similartopics\acp\controller\similar_topics_admin
        arguments:
            - '@cache.driver'
            - '@config'
            - '@config_text'
            - '@dbal.conn'
            - '@vse.similartopics.driver.manager'
            - '@language'
            - '@log'
            - '@request'
            - '@template'
            - '@user'
            - '%core.root_path%'
            - '%core.php_ext%'

# ----- Similar topics DB drivers collection -----
    vse.similartopics.driver_collection:
        class: phpbb\di\service_collection
        arguments:
            - '@service_container'
        tags:
            - { name: service_collection, tag: vse.similartopcs.driver }

    vse.similartopics.driver.postgres:
        class: vse\similartopics\driver\postgres
        arguments:
            - '@dbal.conn'
            - '@config'
        tags:
            - { name: vse.similartopcs.driver }

    vse.similartopics.driver.mysqli:
        class: vse\similartopics\driver\mysqli
        arguments:
            - '@dbal.conn'
        tags:
            - { name: vse.similartopcs.driver }

    vse.similartopics.driver.mysql4:
        class: vse\similartopics\driver\mysql4
        parent: vse.similartopics.driver.mysqli
        tags:
            - { name: vse.similartopcs.driver }
