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
14 lines
198 B
PHP
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;
|
|
|
|
}
|