services:
  telnowedge_import_logger:
    class: Symfony\Bridge\Monolog\Logger
    factory: 'Telnowedge\BaseBundle\Logger\Logger::getLoggerFactory'
    arguments:
      $logger: '@logger'
    tags:
      - {name: monolog.logger, channel: telnowedge_import}

  Telnowedge\ImportBundle\Manager\AbstractManager:
    abstract: true
    calls:
      - method: setLogger
        arguments:
          $logger: '@telnowedge_import_logger'
      - method: setFreepbxManager
        arguments:
          $freepbxManager: '@freepbx_manager'

  Telnowedge\ImportBundle\Provider\AbstractProvider:
    abstract: true
    calls:
      - method: setLogger
        arguments:
          $logger: '@telnowedge_import_logger'
      - method: setFreepbxManager
        arguments:
          $freepbxManager: '@freepbx_manager'

  Telnowedge\ImportBundle\Manager\ImportManager:
    public: true
    parent: Telnowedge\ImportBundle\Manager\AbstractManager
    arguments:
      $userProvider: '@Telnowedge\ImportBundle\Provider\UserProvider'
      $deviceProvider: '@Telnowedge\ImportBundle\Provider\DeviceProvider'
      $phonebookProvider: '@Telnowedge\ImportBundle\Provider\PhonebookProvider'

  Telnowedge\ImportBundle\Provider\UserProvider:
    public: true
    parent: Telnowedge\ImportBundle\Provider\AbstractProvider

  Telnowedge\ImportBundle\Provider\DeviceProvider:
    public: true
    parent: Telnowedge\ImportBundle\Provider\AbstractProvider

  Telnowedge\ImportBundle\Provider\PhonebookProvider:
    public: true
    parent: Telnowedge\ImportBundle\Provider\AbstractProvider
    arguments:
      $directoryUserLdapHandler: '@Telnowedge\DirectoryBundle\Handler\LdapHandler\DirectoryUserLdapHandler'
      $privateDirectoryUserLdapHandler: '@Telnowedge\DirectoryBundle\Handler\LdapHandler\PrivateDirectoryUserLdapHandler'
