You are here

public function Ssi::needsParsing in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/HttpCache/Ssi.php \Symfony\Component\HttpKernel\HttpCache\Ssi::needsParsing()

Checks that the Response needs to be parsed for Surrogate tags.

Parameters

Response $response A Response instance:

Return value

bool true if the Response needs to be parsed, false otherwise

Overrides SurrogateInterface::needsParsing

File

vendor/symfony/http-kernel/HttpCache/Ssi.php, line 94

Class

Ssi
Ssi implements the SSI capabilities to Request and Response instances.

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function needsParsing(Response $response) {
  if (!($control = $response->headers
    ->get('Surrogate-Control'))) {
    return false;
  }
  return (bool) preg_match('#content="[^"]*SSI/1.0[^"]*"#', $control);
}