You are here

public function Ssi::hasSurrogateCapability in Zircon Profile 8.0

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

Checks that at least one surrogate has Surrogate capability.

Parameters

Request $request A Request instance:

Return value

bool true if one surrogate has Surrogate capability, false otherwise

Overrides SurrogateInterface::hasSurrogateCapability

File

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

Class

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

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function hasSurrogateCapability(Request $request) {
  if (null === ($value = $request->headers
    ->get('Surrogate-Capability'))) {
    return false;
  }
  return false !== strpos($value, 'SSI/1.0');
}