HttpContextReaderInterface
in
Interface HttpContextReaderInterface
Tags
Table of Contents
- getActionName() : string
- Returns the name of the action method for the current http context.
- getControllerName() : string
- Returns the controller name for current http request context.
- getPostData() : array<string|int, mixed>
- Returns an array which represents the global $_POST variable of the current http context.
- getQueryParameters() : array<string|int, mixed>
- Returns an array which represents the global $_GET variable of the current http context.
- getServerData() : array<string|int, mixed>
- Returns an array which represents the global $_SERVER variable of the current http context.
Methods
getActionName()
Returns the name of the action method for the current http context.
public
getActionName(HttpContextInterface $httpContext) : string
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.
Return values
string —Name of action method for the current http context.
getControllerName()
Returns the controller name for current http request context.
public
getControllerName(HttpContextInterface $httpContext) : string
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.
Return values
string —Name of controller for the current http context.
getPostData()
Returns an array which represents the global $_POST variable of the current http context.
public
getPostData(HttpContextInterface $httpContext) : array<string|int, mixed>
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.
Return values
array<string|int, mixed> —Array which hold information equal to the global $_POST variable in an object oriented layer.
getQueryParameters()
Returns an array which represents the global $_GET variable of the current http context.
public
getQueryParameters(HttpContextInterface $httpContext) : array<string|int, mixed>
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.
Return values
array<string|int, mixed> —Array which hold information equal to the global $_GET variable in an object oriented layer.
getServerData()
Returns an array which represents the global $_SERVER variable of the current http context.
public
getServerData(HttpContextInterface $httpContext) : array<string|int, mixed>
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.
Return values
array<string|int, mixed> —Array which hold information equal to the global $_SERVER variable in an object oriented layer.