Public Member Functions | |
| newJsonResponse ($data=NULL, $status=200, array $headers=[], $json=FALSE) | |
| newHttpResponse ($content='', $status=200, array $headers=[]) | |
| newServiceApiEngine (ContractsStorageInterface $storage, string $jsonSchema) | |
Factory to generate DKAN API responses.
Coverage is ignored for this class since it's mostly a proxy to initialize new instances.
@codeCoverageIgnore
Definition at line 18 of file Factory.php.
| Drupal\dkan_common\Service\Factory::newHttpResponse | ( | $content = '', |
|
$status = 200, |
|||
| array | $headers = [] |
||
| ) |
Creates new HTTP Response.
| mixed | $content | The response content, see setContent() |
| int | $status | The response status code. |
| array | $headers | An array of response headers. |
Definition at line 48 of file Factory.php.
| Drupal\dkan_common\Service\Factory::newJsonResponse | ( | $data = NULL, |
|
$status = 200, |
|||
| array | $headers = [], |
||
$json = FALSE |
|||
| ) |
Creates a new json response.
| mixed | $data | The response data. |
| int | $status | The response status code. |
| array | $headers | An array of response headers. |
| bool | $json | If the data is already a JSON string. |
Definition at line 32 of file Factory.php.
| Drupal\dkan_common\Service\Factory::newServiceApiEngine | ( | ContractsStorageInterface | $storage, |
| string | $jsonSchema | ||
| ) |
Creates new ServiceApiEngine.
| \Contracts\Storage | $storage | Storage. |
| string | $jsonSchema | Json Schema. |
Definition at line 63 of file Factory.php.