You are here

private function AbstractSurrogateFragmentRenderer::generateSignedFragmentUri in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php \Symfony\Component\HttpKernel\Fragment\AbstractSurrogateFragmentRenderer::generateSignedFragmentUri()
1 call to AbstractSurrogateFragmentRenderer::generateSignedFragmentUri()
AbstractSurrogateFragmentRenderer::render in vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php
Note that if the current Request has no surrogate capability, this method falls back to use the inline rendering strategy.

File

vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php, line 84

Class

AbstractSurrogateFragmentRenderer
Implements Surrogate rendering strategy.

Namespace

Symfony\Component\HttpKernel\Fragment

Code

private function generateSignedFragmentUri($uri, Request $request) {
  if (null === $this->signer) {
    throw new \LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.');
  }

  // we need to sign the absolute URI, but want to return the path only.
  $fragmentUri = $this->signer
    ->sign($this
    ->generateFragmentUri($uri, $request, true));
  return substr($fragmentUri, strlen($request
    ->getSchemeAndHttpHost()));
}