1818use FastForward \Container \ServiceProvider \AggregateServiceProvider ;
1919use FastForward \Http \Client \ServiceProvider \HttpClientServiceProvider ;
2020use FastForward \Http \Message \Factory \ServiceProvider \HttpMessageFactoryServiceProvider ;
21- use Interop \Container \ServiceProviderInterface ;
2221
2322/**
2423 * Class HttpServiceProvider
2928 * It MUST implement the ServiceProviderInterface and MUST delegate factory and extension
3029 * retrieval to the internal AggregateServiceProvider instance.
3130 */
32- final class HttpServiceProvider implements ServiceProviderInterface
31+ final class HttpServiceProvider extends AggregateServiceProvider
3332{
34- /**
35- * @var ServiceProviderInterface The aggregate service provider that includes all HTTP service providers.
36- */
37- private ServiceProviderInterface $ serviceProvider ;
38-
3933 /**
4034 * Constructs the HttpServiceProvider.
4135 *
@@ -44,33 +38,9 @@ final class HttpServiceProvider implements ServiceProviderInterface
4438 */
4539 public function __construct ()
4640 {
47- $ this -> serviceProvider = new AggregateServiceProvider (
41+ parent :: __construct (
4842 new HttpMessageFactoryServiceProvider (),
4943 new HttpClientServiceProvider (),
5044 );
5145 }
52-
53- /**
54- * Returns an array of factory callables provided by the aggregate service provider.
55- *
56- * This method MUST delegate the call to the internal AggregateServiceProvider.
57- *
58- * @return array<string, callable> A map of service identifiers to factory callables.
59- */
60- public function getFactories (): array
61- {
62- return $ this ->serviceProvider ->getFactories ();
63- }
64-
65- /**
66- * Returns an array of service extension callables provided by the aggregate service provider.
67- *
68- * This method MUST delegate the call to the internal AggregateServiceProvider.
69- *
70- * @return array<string, callable> A map of service identifiers to extension callables.
71- */
72- public function getExtensions (): array
73- {
74- return $ this ->serviceProvider ->getExtensions ();
75- }
7646}
0 commit comments