HttpService
in package
implements
HttpServiceInterface
Class HttpService
Tags
Interfaces, Classes and Traits
- HttpServiceInterface
- Interface HttpServiceInterface
Table of Contents
- $httpContextFactory : AbstractHttpContextFactory
- $httpDispatcher : HttpDispatcherInterface
- __construct() : mixed
- Initializes the http service.
- getHttpContext() : HttpContextInterface
- Creates and returns a new instance of an http context object.
- handle() : mixed
- Handles the current http request by the given context.
Properties
$httpContextFactory
protected
AbstractHttpContextFactory
$httpContextFactory
$httpDispatcher
protected
HttpDispatcherInterface
$httpDispatcher
Methods
__construct()
Initializes the http service.
public
__construct(AbstractHttpContextFactory $httpContextFactory, HttpDispatcherInterface $httpDispatcher) : mixed
Parameters
- $httpContextFactory : AbstractHttpContextFactory
-
Factory instance to create context objects.
- $httpDispatcher : HttpDispatcherInterface
-
Instance to dispatch the http response message.
Return values
mixed —getHttpContext()
Creates and returns a new instance of an http context object.
public
getHttpContext() : HttpContextInterface
Return values
HttpContextInterface —handle()
Handles the current http request by the given context.
public
handle(HttpContextInterface $httpContext) : mixed
Parameters
- $httpContext : HttpContextInterface
-
Context object which holds information about the current request.