| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\DependencyInjection; |
| 4: | |
| 5: | /** @api */ |
| 6: | interface Container |
| 7: | { |
| 8: | |
| 9: | public function hasService(string $serviceName): bool; |
| 10: | |
| 11: | /** |
| 12: | * @return mixed |
| 13: | * @throws MissingServiceException |
| 14: | */ |
| 15: | public function getService(string $serviceName); |
| 16: | |
| 17: | /** |
| 18: | * @template T of object |
| 19: | * @param class-string<T> $className |
| 20: | * @return T |
| 21: | * @throws MissingServiceException |
| 22: | */ |
| 23: | public function getByType(string $className); |
| 24: | |
| 25: | /** |
| 26: | * @param class-string $className |
| 27: | * @return string[] |
| 28: | */ |
| 29: | public function findServiceNamesByType(string $className): array; |
| 30: | |
| 31: | /** |
| 32: | * @return mixed[] |
| 33: | */ |
| 34: | public function getServicesByTag(string $tagName): array; |
| 35: | |
| 36: | /** |
| 37: | * @return mixed[] |
| 38: | */ |
| 39: | public function getParameters(): array; |
| 40: | |
| 41: | public function hasParameter(string $parameterName): bool; |
| 42: | |
| 43: | /** |
| 44: | * @return mixed |
| 45: | * @throws ParameterNotFoundException |
| 46: | */ |
| 47: | public function getParameter(string $parameterName); |
| 48: | |
| 49: | } |
| 50: |