services:
  # Databases
  Doctrine\ORM\EntityManager:
    factory: [Lehitgaber\Web\Shared\Infrastructure\Doctrine\MoocEntityManagerFactory, create]
    arguments:
      - driver:   '%env(MOOC_DATABASE_DRIVER)%'
        host:     '%env(MOOC_DATABASE_HOST)%'
        port:     '%env(MOOC_DATABASE_PORT)%'
        dbname:   '%env(MOOC_DATABASE_NAME)%'
        user:     '%env(MOOC_DATABASE_USER)%'
        password: '%env(MOOC_DATABASE_PASSWORD)%'
      - '%env(APP_ENV)%'
    tags:
      - { name: lehitgaber.database_connection }
    public: true


  # Courses
  Lehitgaber\Web\Courses\Domain\CourseRepository: '@Lehitgaber\Web\Courses\Infrastructure\Persistence\DoctrineCourseRepository'

