services.yml 940 Bytes
Newer Older
Michael McAndrew's avatar
Michael McAndrew committed
1 2 3
# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
4 5
  books_dir: %kernel.root_dir%/../books
  publish_path_root: %kernel.root_dir%/../web
Michael McAndrew's avatar
Michael McAndrew committed
6 7

services:
8 9 10 11

  library:
    class: AppBundle\Model\Library
    arguments:
12
      - %books_dir%
13

14 15 16
  github.hook.processor:
    class: AppBundle\Utils\GitHubHookProcessor

17 18 19 20 21 22
  mkdocs:
    class: AppBundle\Utils\MkDocs
    arguments:
      - '@filesystem'
      - '@file_locator'

23 24 25 26 27 28
  publisher:
    class: AppBundle\Utils\Publisher
    arguments:
      - '@request_stack'
      - '@publish.logger'
      - '@filesystem'
29
      - '@library'
30
      - %publisher_repos_dir%
31 32
      - %publish_path_root%
      - '@mkdocs'
33 34 35 36 37 38 39 40 41 42 43

  publish.logger:
    class: Monolog\Logger
    arguments:
      - 'publish'
      - ['@streamhandler']

  streamhandler:
    class: Monolog\Handler\StreamHandler
    arguments:
      - %kernel.logs_dir%/publish.log