2026-07-21 14:04:45 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Support\Publishing;
|
|
|
|
|
|
|
|
|
|
use App\Models\Post;
|
2026-07-27 21:24:49 +03:00
|
|
|
use App\Models\SocialAccount;
|
2026-07-21 14:04:45 +03:00
|
|
|
|
|
|
|
|
interface Publisher
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Whether this publisher handles the given post's type. Does not imply
|
|
|
|
|
* the post is actually publishable (see publish()'s rejected results).
|
|
|
|
|
*/
|
|
|
|
|
public function supports(Post $post): bool;
|
|
|
|
|
|
2026-07-27 21:24:49 +03:00
|
|
|
public function publish(Post $post, ?SocialAccount $socialAccount = null): PublishResult;
|
2026-07-21 14:04:45 +03:00
|
|
|
}
|