Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!2683
An error occurred while fetching the assigned milestone of the selected merge_request.
Issue
#3296842
: Move ResourceResponse to from rest module to Core-core
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3296842
: Move ResourceResponse to from rest module to Core-core
issue/drupal-3296842:3296842-move-resourceresponse-to
into
10.1.x
Overview
0
Commits
3
Pipelines
0
Changes
16
Open
Alexander Delfim
requested to merge
issue/drupal-3296842:3296842-move-resourceresponse-to
into
10.1.x
2 years ago
Overview
0
Commits
3
Pipelines
0
Changes
16
Expand
0
0
Merge request reports
Compare
10.1.x
version 1
23bd76ee
2 years ago
10.1.x (HEAD)
and
latest version
latest version
a1a3e05d
3 commits,
2 years ago
version 1
23bd76ee
2 commits,
2 years ago
16 files
+
128
−
23
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
16
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/ResourceResponse/ResourceResponse.php
0 → 100644
+
41
−
0
Options
<?php
namespace
Drupal\Core\ResourceResponse
;
use
Drupal\Core\Cache\CacheableResponseInterface
;
use
Drupal\Core\Cache\CacheableResponseTrait
;
use
Symfony\Component\HttpFoundation\Response
;
/**
* Contains data for serialization before sending the response.
*
* We do not want to abuse the $content property on the Response class to store
* our response data. $content implies that the provided data must either be a
* string or an object with a __toString() method, which is not a requirement
* for data used here.
*
* Routes that return this response must specify the '_format' requirement.
*
* @see \Drupal\Core\ResourceResponse\ModifiedResourceResponse
*/
class
ResourceResponse
extends
Response
implements
CacheableResponseInterface
,
ResourceResponseInterface
{
use
CacheableResponseTrait
;
use
ResourceResponseTrait
;
/**
* Constructor for ResourceResponse objects.
*
* @param mixed $data
* Response data that should be serialized.
* @param int $status
* The response status code.
* @param array $headers
* An array of response headers.
*/
public
function
__construct
(
$data
=
NULL
,
$status
=
200
,
$headers
=
[])
{
$this
->
responseData
=
$data
;
parent
::
__construct
(
''
,
$status
,
$headers
);
}
}
Loading