Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/rest/src/ModifiedResourceResponse.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\rest; | |
4 | |
5 use Symfony\Component\HttpFoundation\Response; | |
6 | |
7 /** | |
8 * A response that does not contain cacheability metadata. | |
9 * | |
10 * Used when resources are modified by a request: responses to unsafe requests | |
11 * (POST/PATCH/DELETE) can never be cached. | |
12 * | |
13 * @see \Drupal\rest\ResourceResponse | |
14 */ | |
15 class ModifiedResourceResponse extends Response implements ResourceResponseInterface { | |
16 | |
17 use ResourceResponseTrait; | |
18 | |
19 /** | |
20 * Constructor for ModifiedResourceResponse objects. | |
21 * | |
22 * @param mixed $data | |
23 * Response data that should be serialized. | |
24 * @param int $status | |
25 * The response status code. | |
26 * @param array $headers | |
27 * An array of response headers. | |
28 */ | |
29 public function __construct($data = NULL, $status = 200, $headers = []) { | |
30 $this->responseData = $data; | |
31 parent::__construct('', $status, $headers); | |
32 } | |
33 | |
34 } |