You are here

public function HttpCache::getSurrogate in Zircon Profile 8

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

Gets the Surrogate instance.

Return value

SurrogateInterface A Surrogate instance

Throws

\LogicException

1 call to HttpCache::getSurrogate()
HttpCache::getEsi in vendor/symfony/http-kernel/HttpCache/HttpCache.php
Gets the Esi instance.

File

vendor/symfony/http-kernel/HttpCache/HttpCache.php, line 160

Class

HttpCache
Cache provides HTTP caching.

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function getSurrogate() {
  if (!$this->surrogate instanceof Esi) {
    throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
  }
  return $this->surrogate;
}