Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Server\Endpoint;
6
7use LambdaTwelve\OneRecord\Server\Http\Negotiated;
8use LambdaTwelve\OneRecord\Server\Spi\Agent;
9use Psr\Http\Message\ResponseInterface;
10use Psr\Http\Message\ServerRequestInterface;
11
12/**
13 * One API operation. The server has already authenticated the caller and
14 * negotiated the version when an endpoint runs; the endpoint applies access
15 * control for its resource and throws HttpException for every failure.
16 */
17interface Endpoint
18{
19    /**
20     * @param array<string, string> $parameters path parameters from the route
21     */
22    public function handle(ServerRequestInterface $request, Agent $agent, Negotiated $negotiated, array $parameters): ResponseInterface;
23}