Extract a PostPusher service to push the post
Extract a `PostPusher` service with an IFTTT implementation. That means if this needs to change to use a different service in the future, the IFTTT implementation can remain unchanged and a new implementation can be added with its own form params etc. This also makes this functionality easier to test as we can add a `NullPostPusher` implementation for testing. References #332
This commit is contained in:
parent
f6ff21e04e
commit
d7459ff30f
5 changed files with 80 additions and 23 deletions
|
@ -10,3 +10,9 @@ services:
|
|||
|
||||
Drupal\opdavies_blog\Repository\PostRepository:
|
||||
autowire: true
|
||||
|
||||
Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher:
|
||||
autowire: true
|
||||
|
||||
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
|
||||
alias: Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue