CommonGateway\CoreBundle\Service\RequestService
Handles incomming request from endpoints or controllers that relate to the gateways object structure (eav).
Methods
| Name | Description |
|---|---|
| __construct | |
| checkEmbedded | If embedded should be shown or not. |
| createResponse | Creating the response object. |
| getId | Get the ID from given parameters. |
| getSchema | Get the schema from given parameters returns false if no schema could be established. |
| itemRequestHandler | |
| proxyHandler | |
| realRequestQueryAll | A function to replace Request->query->all() because Request->query->all() will replace some characters with an underscore. |
| requestHandler | Handles incomming requests and is responsible for generating a response. |
| searchRequestHandler | This function searches all the objectEntities and formats the data. |
| shouldWeUnsetEmbedded | If embedded should be shown or not. |
RequestService::__construct
Description
__construct (void)
Parameters
This function has no parameters.
Return Values
void
RequestService::checkEmbedded
Description
public checkEmbedded (object|array $result)
If embedded should be shown or not.
Parameters
(object|array) $result: fetched result
Return Values
array|null
RequestService::createResponse
Description
public createResponse ( $data)
Creating the response object.
Parameters
() $data
Return Values
\CommonGateway\CoreBundle\Service\Response
RequestService::getId
Description
public getId (array $object)
Get the ID from given parameters.
Parameters
(array) $object
Return Values
string|false
RequestService::getSchema
Description
public getSchema (array $parameters)
Get the schema from given parameters returns false if no schema could be established.
Parameters
(array) $parameters
Return Values
\Entity|false
RequestService::itemRequestHandler
Description
itemRequestHandler (void)
Parameters
This function has no parameters.
Return Values
void
RequestService::proxyHandler
Description
proxyHandler (void)
Parameters
This function has no parameters.
Return Values
void
RequestService::realRequestQueryAll
Description
public realRequestQueryAll (string $method)
A function to replace Request->query->all() because Request->query->all() will replace some characters with an underscore.
This function will not.
Parameters
(string) $method: The method of the Request
Return Values
array
An array with all query parameters.
RequestService::requestHandler
Description
public requestHandler (array $data, array $configuration)
Handles incomming requests and is responsible for generating a response.
Parameters
(array) $data: The data from the call(array) $configuration: The configuration from the call
Return Values
\Response
The modified data
RequestService::searchRequestHandler
Description
public searchRequestHandler (array $data, array $configuration)
This function searches all the objectEntities and formats the data.
Parameters
(array) $data: The data from the call(array) $configuration: The configuration from the call
Return Values
array
The modified data
RequestService::shouldWeUnsetEmbedded
Description
public shouldWeUnsetEmbedded (object|array $result, ?array $accept)
If embedded should be shown or not.
Parameters
(object|array) $result: fetched result(?array) $accept: accept header
Return Values
array|null