-
Notifications
You must be signed in to change notification settings - Fork 1
RequestService
Handles incomming request from endpoints or controllers that relate to the gateways object structure (eav).
| 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. |
Description
__construct (void)Parameters
This function has no parameters.
Return Values
void
Description
public checkEmbedded (object|array $result)If embedded should be shown or not.
Parameters
-
(object|array) $result: fetched result
Return Values
array|null
Description
public createResponse ( $data)Creating the response object.
Parameters
() $data
Return Values
\CommonGateway\CoreBundle\Service\Response
Description
public getId (array $object)Get the ID from given parameters.
Parameters
(array) $object
Return Values
string|false
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
Description
itemRequestHandler (void)Parameters
This function has no parameters.
Return Values
void
Description
proxyHandler (void)Parameters
This function has no parameters.
Return Values
void
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.
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
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
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