oliverdavies.uk-drupal-old/web/modules/custom/blog/src/Service/PostPusher/PostPusher.php
Oliver Davies d7459ff30f 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
2021-01-01 22:45:23 +00:00

14 lines
198 B
PHP

<?php
declare(strict_types=1);
namespace Drupal\opdavies_blog\Service\PostPusher;
use Drupal\opdavies_blog\Entity\Node\Post;
interface PostPusher {
public function push(Post $post): void;
}