| 1441 |
ariadna |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Slim Framework (https://slimframework.com)
|
|
|
5 |
*
|
|
|
6 |
* @license https://github.com/slimphp/Slim/blob/4.x/LICENSE.md (MIT License)
|
|
|
7 |
*/
|
|
|
8 |
|
|
|
9 |
declare(strict_types=1);
|
|
|
10 |
|
|
|
11 |
namespace Slim\Interfaces;
|
|
|
12 |
|
|
|
13 |
use Psr\Http\Message\ResponseFactoryInterface;
|
|
|
14 |
use Psr\Http\Message\StreamFactoryInterface;
|
|
|
15 |
use RuntimeException;
|
|
|
16 |
|
|
|
17 |
interface Psr17FactoryInterface
|
|
|
18 |
{
|
|
|
19 |
/**
|
|
|
20 |
* @throws RuntimeException when the factory could not be instantiated
|
|
|
21 |
*/
|
|
|
22 |
public static function getResponseFactory(): ResponseFactoryInterface;
|
|
|
23 |
|
|
|
24 |
/**
|
|
|
25 |
* @throws RuntimeException when the factory could not be instantiated
|
|
|
26 |
*/
|
|
|
27 |
public static function getStreamFactory(): StreamFactoryInterface;
|
|
|
28 |
|
|
|
29 |
/**
|
|
|
30 |
* @throws RuntimeException when the factory could not be instantiated
|
|
|
31 |
*/
|
|
|
32 |
public static function getServerRequestCreator(): ServerRequestCreatorInterface;
|
|
|
33 |
|
|
|
34 |
/**
|
|
|
35 |
* Is the PSR-17 ResponseFactory available
|
|
|
36 |
*/
|
|
|
37 |
public static function isResponseFactoryAvailable(): bool;
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* Is the PSR-17 StreamFactory available
|
|
|
41 |
*/
|
|
|
42 |
public static function isStreamFactoryAvailable(): bool;
|
|
|
43 |
|
|
|
44 |
/**
|
|
|
45 |
* Is the ServerRequest creator available
|
|
|
46 |
*/
|
|
|
47 |
public static function isServerRequestCreatorAvailable(): bool;
|
|
|
48 |
}
|