1: | <?php |
2: | |
3: | namespace OpenSearch; |
4: | |
5: | use OpenSearch\Endpoints\AbstractEndpoint; |
6: | |
7: | /** |
8: | * A factory for creating endpoints. |
9: | */ |
10: | interface EndpointFactoryInterface |
11: | { |
12: | /** |
13: | * Gets an endpoint. |
14: | * |
15: | * @phpstan-template T of AbstractEndpoint |
16: | * @phpstan-param class-string<T> $class |
17: | * @phpstan-return T |
18: | */ |
19: | public function getEndpoint(string $class): AbstractEndpoint; |
20: | |
21: | } |
22: |