X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fconfig%2Fservices.yml;h=0036f45eea4e2a3bf75c008da768266b8c7a8050;hb=68003139e133835805b143b62c4407f19b495dab;hp=e95ef4520f990cf174765179eda7dc197d53cd21;hpb=cdd3010b478c9ca818dd6d22d03c81ef4a5ab208;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index e95ef452..0036f45e 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -29,8 +29,8 @@ services: arguments: - "@doctrine" - wallabag_core.table_prefix_subscriber: - class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber + wallabag_core.subscriber.table_prefix: + class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber arguments: - "%database_table_prefix%" tags: @@ -40,21 +40,7 @@ services: class: Graby\Graby arguments: - - error_message: "wallabag can't retrieve contents for this article. Please report this issue to us." - http_client: - user_agents: - 'lifehacker.com': 'PHP/5.2' - 'gawker.com': 'PHP/5.2' - 'deadspin.com': 'PHP/5.2' - 'kotaku.com': 'PHP/5.2' - 'jezebel.com': 'PHP/5.2' - 'io9.com': 'PHP/5.2' - 'jalopnik.com': 'PHP/5.2' - 'gizmodo.com': 'PHP/5.2' - '.wikipedia.org': 'Mozilla/5.2' - '.fok.nl': 'Googlebot/2.1' - 'getpocket.com': 'PHP/5.2' - 'iansommerville.com': 'PHP/5.2' + error_message: '%wallabag_core.fetching_error_message%' calls: - [ setLogger, [ "@logger" ] ] tags: @@ -88,21 +74,10 @@ services: arguments: - WallabagCoreBundle:Tag - wallabag_core.registration_confirmed: - class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener - arguments: - - "@doctrine.orm.entity_manager" - - "%wallabag_core.theme%" - - "%wallabag_core.items_on_page%" - - "%wallabag_core.rss_limit%" - - "%wallabag_core.language%" - tags: - - { name: kernel.event_subscriber } - wallabag_core.helper.entries_export: class: Wallabag\CoreBundle\Helper\EntriesExport arguments: - - "@craue_config" + - '@=service(''craue_config'').get(''wallabag_url'')' - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png wallabag.operator.array.matches: @@ -119,9 +94,53 @@ services: class: Wallabag\CoreBundle\Helper\Redirect arguments: - "@router" + - "@security.token_storage" wallabag_core.helper.prepare_pager_for_entries: class: Wallabag\CoreBundle\Helper\PreparePagerForEntries arguments: - "@security.token_storage" - "@router" + + wallabag_core.redis.client: + class: Predis\Client + arguments: + - + scheme: '%redis_scheme%' + host: '%redis_host%' + port: '%redis_port%' + path: '%redis_path%' + + wallabag_core.exception_controller: + class: Wallabag\CoreBundle\Controller\ExceptionController + arguments: + - '@twig' + - '%kernel.debug%' + + wallabag_core.subscriber.sqlite_cascade_delete: + class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber + arguments: + - "@doctrine" + tags: + - { name: doctrine.event_subscriber } + + wallabag_core.subscriber.download_images: + class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber + arguments: + - "@doctrine.orm.default_entity_manager" + - "@wallabag_core.entry.download_images" + - '@=service(''craue_config'').get(''download_images_enabled'')' + - "@logger" + tags: + - { name: kernel.event_subscriber } + + wallabag_core.entry.download_images: + class: Wallabag\CoreBundle\Helper\DownloadImages + arguments: + - "@wallabag_core.entry.download_images.client" + - "%kernel.root_dir%/../web/assets/images" + - '@=service(''craue_config'').get(''wallabag_url'')' + - "@logger" + + wallabag_core.entry.download_images.client: + class: GuzzleHttp\Client