HttpClientServiceProvider

Class
implements ServiceProviderInterface
Final: Yes

Class HttpClientServiceProvider.

Description

Provides a PSR-compliant HTTP client service provider for dependency injection containers. This service provider SHALL register factories for HTTP client services. It MUST implement the ServiceProviderInterface to allow standardized service registration.

Table of Contents

Interfaces

Methods

getExtensions()

Retrieves an array of service extensions.

 : array<class-string, callable>
getFactories()

Retrieves an array of service factories.

 : array<class-string, callable>
Methods

getExtensions()

Public

Retrieves an array of service extensions.

public getExtensions() : array<class-string, callable>

Description

This method MUST return an associative array of callables to extend existing services. If no extensions are to be registered, an empty array MUST be returned.

Return values
array<class-string, callable>

Description

an associative array of service extensions

getFactories()

Public

Retrieves an array of service factories.

public getFactories() : array<class-string, callable>

Description

This method MUST return an associative array where the key is the service name or interface and the value is a callable or factory responsible for creating the service. The array returned SHALL register the default Symfony HttpClient and a PSR-18 compatible client.

Return values
array<class-string, callable>

Description

an associative array of service factories