Files
fewo-stommer/app/Channels/Contracts/ReceivesWebhooks.php
T

20 lines
551 B
PHP

<?php
namespace App\Channels\Contracts;
use App\Channels\Events\ChannelEvent;
use App\Models\Channel;
use Illuminate\Http\Request;
/**
* Capability of a connector whose portal pushes events (webhook). The connector verifies the signature (authenticity
* of the origin) and translates the payload; the business decision stays with ChannelEventHandler.
*/
interface ReceivesWebhooks
{
/**
* @return list<ChannelEvent> empty when the signature is not valid
*/
public function receive(Channel $channel, Request $request): array;
}