Files
hado/core/app/Channels/ChannelDriver.php
2026-09-04 07:18:37 -03:00

21 lines
742 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Channels;
use App\Enums\Presence;
use App\Models\Delivery;
use App\Models\Event;
use App\Models\User;
interface ChannelDriver
{
/** Пользователь сейчас доступен через этот канал? */
public function presence(User $user, array $config): Presence;
/** Доставить напоминание. Не бросает: ошибки — в DeliveryOutcome::failed. */
public function deliver(Event $event, User $user, array $config, Delivery $delivery): DeliveryOutcome;
/** Событие закрыто: убрать кнопки и т.п. Best effort, никогда не бросает. */
public function onDone(Event $event, Delivery $delivery): void;
}