bootdesk/chat-sdk

MiddlewareDispatcher
in package

FinalYes

Table of Contents

Properties

$middlewares  : array{webhook: array, receiving: array, sending: array, webhook_event: array}

Methods

addReceiving()  : void
addSending()  : void
addWebhook()  : void
addWebhookEvent()  : void
getMiddlewares()  : array<string|int, mixed>
processReceiving()  : Message|null
processSending()  : PostableMessage|null
processWebhook()  : ResponseInterface
processWebhookEvent()  : Adapter
buildPipeline()  : mixed
callMiddleware()  : mixed
process()  : mixed

Properties

$middlewares

private array{webhook: array, receiving: array, sending: array, webhook_event: array} $middlewares = ['webhook' => [], 'receiving' => [], 'sending' => [], 'webhook_event' => []]

Methods

getMiddlewares()

public getMiddlewares("webhook"|"receiving"|"sending"|"webhook_event" $type) : array<string|int, mixed>
Parameters
$type : "webhook"|"receiving"|"sending"|"webhook_event"
Return values
array<string|int, mixed>

processWebhook()

public processWebhook(ServerRequestInterface $request, callable(ServerRequestInterface): ResponseInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : callable(ServerRequestInterface): ResponseInterface
Return values
ResponseInterface

buildPipeline()

private buildPipeline(array<string|int, mixed> $middlewares, mixed $context, callable $handler) : mixed
Parameters
$middlewares : array<string|int, mixed>
$context : mixed
$handler : callable

callMiddleware()

private callMiddleware(object $m, array<string|int, mixed> $args, callable $next) : mixed
Parameters
$m : object
$args : array<string|int, mixed>
$next : callable

process()

private process("webhook"|"receiving"|"sending" $type, mixed $context, callable $handler) : mixed
Parameters
$type : "webhook"|"receiving"|"sending"
$context : mixed
$handler : callable
On this page

Search results