X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FResources%2Fconfig%2Fservices.yml;h=520d43aff9d0a30519d67923b8b2cc5ea2b22e65;hb=bd8c13e8b028bba7e8222c7e3f410e4444c794c5;hp=d77779eb1a65883159249866b50da8088078eb17;hpb=0aa344dc247c77376fcbf2112191f9f8b3dfc846;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml index d77779eb..520d43af 100644 --- a/src/Wallabag/ImportBundle/Resources/config/services.yml +++ b/src/Wallabag/ImportBundle/Resources/config/services.yml @@ -1,8 +1,55 @@ services: + wallabag_import.chain: + class: Wallabag\ImportBundle\Import\ImportChain + + wallabag_import.pocket.client: + class: GuzzleHttp\Client + arguments: + - + defaults: + headers: + content-type: "application/json" + X-Accept: "application/json" + wallabag_import.pocket.import: class: Wallabag\ImportBundle\Import\PocketImport arguments: - "@security.token_storage" - - "@session" - "@doctrine.orm.entity_manager" - - %pocket_consumer_key% + - "@wallabag_core.content_proxy" + - "@craue_config" + calls: + - [ setClient, [ "@wallabag_import.pocket.client" ] ] + - [ setLogger, [ "@logger" ]] + tags: + - { name: wallabag_import.import, alias: pocket } + + wallabag_import.wallabag_v1.import: + class: Wallabag\ImportBundle\Import\WallabagV1Import + arguments: + - "@doctrine.orm.entity_manager" + - "@wallabag_core.content_proxy" + calls: + - [ setLogger, [ "@logger" ]] + tags: + - { name: wallabag_import.import, alias: wallabag_v1 } + + wallabag_import.wallabag_v2.import: + class: Wallabag\ImportBundle\Import\WallabagV2Import + arguments: + - "@doctrine.orm.entity_manager" + - "@wallabag_core.content_proxy" + calls: + - [ setLogger, [ "@logger" ]] + tags: + - { name: wallabag_import.import, alias: wallabag_v2 } + + wallabag_import.readability.import: + class: Wallabag\ImportBundle\Import\ReadabilityImport + arguments: + - "@doctrine.orm.entity_manager" + - "@wallabag_core.content_proxy" + calls: + - [ setLogger, [ "@logger" ]] + tags: + - { name: wallabag_import.import, alias: readability }