protected function JsonPathReplacer::getContentId in Subrequests 3.x
Same name and namespace in other branches
- 8.2 src/JsonPathReplacer.php \Drupal\subrequests\JsonPathReplacer::getContentId()
Gets the clean Content ID for a response.
Removes all the derived indicators and the surrounding angles.
@returns string The content ID.
Parameters
\Symfony\Component\HttpFoundation\Response $response: The response to extract the Content ID from.
1 call to JsonPathReplacer::getContentId()
- JsonPathReplacer::extractTokenReplacements in src/
JsonPathReplacer.php - Extracts the token replacements for a given subrequest.
File
- src/
JsonPathReplacer.php, line 314
Class
Namespace
Drupal\subrequestsCode
protected function getContentId(Response $response) {
$header = $response->headers
->get('Content-ID', '');
return substr($header, 1, strlen($header) - 2);
}