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 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace LambdaTwelve\OneRecord\Server\Endpoint; |
| 6 | |
| 7 | use LambdaTwelve\OneRecord\Server\Http\Negotiated; |
| 8 | use LambdaTwelve\OneRecord\Server\Spi\Agent; |
| 9 | use Psr\Http\Message\ResponseInterface; |
| 10 | use 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 | */ |
| 17 | interface 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 | } |