imports:
    - { resource: tables.yml }
    - { resource: services_controller.yml }
    - { resource: services_files.yml }
    - { resource: services_notification_types.yml }


services:
    phpbbgallery.core.album:
        class: phpbbgallery\core\album\album
        arguments:
            - '@dbal.conn'
            - '@user'
            - '@language'
            - '@profilefields.manager'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.cache'
            - '@phpbbgallery.core.block'
            - '@phpbbgallery.core.config'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.watch%'
            - '%tables.phpbbgallery.contests%'
    phpbbgallery.core.album.display:
        class: phpbbgallery\core\album\display
        arguments:
            - '@auth'
            - '@config'
            - '@controller.helper'
            - '@dbal.conn'
            - '@pagination'
            - '@request'
            - '@template'
            - '@user'
            - '@language'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.user'
            - '@phpbbgallery.core.misc'
            - '%core.root_path%'
            - '%core.php_ext%'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.contests%'
            - '%tables.phpbbgallery.tracking%'
            - '%tables.phpbbgallery.moderators%'
    phpbbgallery.core.album.loader:
        class: phpbbgallery\core\album\loader
        arguments:
            - '@dbal.conn'
            - '@user'
            - '%tables.phpbbgallery.albums%'
    phpbbgallery.core.album.manage:
        class: phpbbgallery\core\album\manage
        arguments:
            - '@user'
            - '@language'
            - '@request'
            - '@dbal.conn'
            - '@dispatcher'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.album'
            - '@phpbbgallery.core.album.display'
            - '@phpbbgallery.core.image'
            - '@phpbbgallery.core.cache'
            - '@phpbbgallery.core.user'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.contest'
            - '@phpbbgallery.core.report'
            - '@phpbbgallery.core.log'
            - '@phpbbgallery.core.notification'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.comments%'
            - '%tables.phpbbgallery.permissions%'
            - '%tables.phpbbgallery.moderators%'
            - '%tables.phpbbgallery.contests%'
    phpbbgallery.core.misc:
        class: phpbbgallery\core\misc
        arguments:
            - '@dbal.conn'
            - '@user'
            - '@language'
            - '@config'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.user'
            - '@phpbbgallery.core.url'
            - '%tables.phpbbgallery.tracking%'
    phpbbgallery.core.auth:
        class: phpbbgallery\core\auth\auth
        arguments:
            - '@phpbbgallery.core.cache'
            - '@dbal.conn'
            - '@phpbbgallery.core.user'
            - '@user'
            - '@auth'
            - '%tables.phpbbgallery.permissions%'
            - '%tables.phpbbgallery.roles%'
            - '%tables.phpbbgallery.users%'
            - '%tables.phpbbgallery.albums%'
    phpbbgallery.core.auth.level:
        class: phpbbgallery\core\auth\level
        arguments:
            - '@phpbbgallery.core.auth'
            - '@config'
            - '@template'
            - '@user'
            - '@language'
    phpbbgallery.core.cache:
        class: phpbbgallery\core\cache
        arguments:
            - '@cache'
            - '@dbal.conn'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.images%'
    phpbbgallery.core.file.tool:
        class: phpbbgallery\core\file\file
        arguments:
            - '@request'
            - '@phpbbgallery.core.url'
            - '@phpbbgallery.core.config'
            - '2'
    phpbbgallery.core.image:
        class: phpbbgallery\core\image\image
        arguments:
            - '@dbal.conn'
            - '@user'
            - '@language'
            - '@template'
            - '@dispatcher'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.album'
            - '@phpbbgallery.core.config'
            - '@controller.helper'
            - '@phpbbgallery.core.url'
            - '@phpbbgallery.core.log'
            - '@phpbbgallery.core.notification.helper'
            - '@phpbbgallery.core.report'
            - '@phpbbgallery.core.cache'
            - '@phpbbgallery.core.user'
            - '@phpbbgallery.core.contest'
            - '@phpbbgallery.core.file.tool'
            - '%tables.phpbbgallery.images%'
    phpbbgallery.core.user:
        class: phpbbgallery\core\user
        arguments:
            - '@dbal.conn'
            - '@dispatcher'
            - '@user'
            - '@profilefields.manager'
            - '@config'
            - '@auth'
            - '%tables.phpbbgallery.users%'
            - '%core.root_path%'
            - '%core.php_ext%'
    phpbbgallery.core.config:
        class: phpbbgallery\core\config
        arguments:
            - '@config'
    phpbbgallery.core.report:
        class: phpbbgallery\core\report
        arguments:
            - '@phpbbgallery.core.log'
            - '@phpbbgallery.core.auth'
            - '@user'
            - '@language'
            - '@dbal.conn'
            - '@user_loader'
            - '@phpbbgallery.core.album'
            - '@template'
            - '@controller.helper'
            - '@phpbbgallery.core.config'
            - '@pagination'
            - '@phpbbgallery.core.notification.helper'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.reports%'
    phpbbgallery.core.comment:
        class: phpbbgallery\core\comment
        arguments:
            - '@user'
            - '@dbal.conn'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.block'
            - '%tables.phpbbgallery.comments%'
            - '%tables.phpbbgallery.images%'
    phpbbgallery.core.url:
        class: phpbbgallery\core\url
        arguments:
            - '@template'
            - '@request'
            - '@config'
            - '%core.root_path%'
            - '%core.php_ext%'
    phpbbgallery.core.moderate:
        class: phpbbgallery\core\moderate
        arguments:
            - '@dbal.conn'
            - '@template'
            - '@controller.helper'
            - '@user'
            - '@language'
            - '@user_loader'
            - '@phpbbgallery.core.album'
            - '@phpbbgallery.core.auth'
            - '@pagination'
            - '@phpbbgallery.core.comment'
            - '@phpbbgallery.core.report'
            - '@phpbbgallery.core.image'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.notification'
            - '@phpbbgallery.core.rating'
            - '%tables.phpbbgallery.images%'
    phpbbgallery.core.search:
        class: phpbbgallery\core\search
        arguments:
            - '@dbal.conn'
            - '@template'
            - '@user'
            - '@language'
            - '@controller.helper'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.album'
            - '@phpbbgallery.core.image'
            - '@pagination'
            - '@user_loader'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.comments%'
    phpbbgallery.core.notification:
        class: phpbbgallery\core\notification
        arguments:
            - '@dbal.conn'
            - '@user'
            - '%tables.phpbbgallery.watch%'
    phpbbgallery.core.notification.helper:
        class: phpbbgallery\core\notification\helper
        arguments:
            - '@config'
            - '@dbal.conn'
            - '@request'
            - '@template'
            - '@user'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.album.loader'
            - '@controller.helper'
            - '@phpbbgallery.core.url'
            - '@service_container'
            - '%core.root_path%'
            - '%core.php_ext%'
            - '%tables.phpbbgallery.watch%'
    phpbbgallery.core.log:
        class: phpbbgallery\core\log
        arguments:
            - '@dbal.conn'
            - '@user'
            - '@language'
            - '@user_loader'
            - '@template'
            - '@controller.helper'
            - '@pagination'
            - '@phpbbgallery.core.auth'
            - '@phpbbgallery.core.config'
            - '%tables.phpbbgallery.log%'
            - '%tables.phpbbgallery.images%'
    phpbbgallery.core.block:
        class: phpbbgallery\core\block
    phpbbgallery.core.contest:
        class: phpbbgallery\core\contest
        arguments:
            - '@dbal.conn'
            - '@phpbbgallery.core.config'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.contests%'
    phpbbgallery.core.upload:
        class: phpbbgallery\core\upload
        arguments:
            - '@user'
            - '@language'
            - '@dbal.conn'
            - '@dispatcher'
            - '@request'
            - '@files.upload'
            - '@phpbbgallery.core.image'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.url'
            - '@phpbbgallery.core.block'
            - '@phpbbgallery.core.file.tool'
            - '%tables.phpbbgallery.images%'
            - '%core.root_path%'
            - '%core.php_ext%'
    phpbbgallery.core.rating:
        class: phpbbgallery\core\rating
        arguments:
            - '@dbal.conn'
            - '@template'
            - '@user'
            - '@language'
            - '@request'
            - '@phpbbgallery.core.config'
            - '@phpbbgallery.core.auth'
            - '%tables.phpbbgallery.images%'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.rates%'
#######################
#### Define event #####
#######################

    phpbbgallery.core.listener:
        class: phpbbgallery\core\event\main_listener
        arguments:
            - '@controller.helper'
            - '@template'
            - '@user'
            - '@language'
            - '@phpbbgallery.core.search'
            - '@phpbbgallery.core.config'
            - '@dbal.conn'
            - '%tables.phpbbgallery.albums%'
            - '%tables.phpbbgallery.users%'
            - '%core.php_ext%'
        tags:
            - { name: event.listener }

