abstract class AbstractSurrogate implements SurrogateInterface
Abstract class implementing Surrogate capabilities to Request and Response instances.
protected | $contentTypes | ||
protected | $phpEscapeMap |
__construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) | ||
ResponseCacheStrategyInterface | createCacheStrategy() Returns a new cache strategy instance. | |
bool | hasSurrogateCapability(Request $request) Checks that at least one surrogate has Surrogate capability. | |
addSurrogateCapability(Request $request) Adds Surrogate-capability to the given Request. | ||
bool | needsParsing(Response $response) Checks that the Response needs to be parsed for Surrogate tags. | |
string | handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors) Handles a Surrogate from the cache. | |
removeFromControl(Response $response) Remove the Surrogate from the Surrogate-Control header. |
array | $contentTypes | An array of content-type that should be parsed for Surrogate information (default: text/html, text/xml, application/xhtml+xml, and application/xml) |
Returns a new cache strategy instance.
ResponseCacheStrategyInterface | A ResponseCacheStrategyInterface instance |
Checks that at least one surrogate has Surrogate capability.
Request | $request |
bool | true if one surrogate has Surrogate capability, false otherwise |
Adds Surrogate-capability to the given Request.
Request | $request |
Checks that the Response needs to be parsed for Surrogate tags.
Response | $response |
bool | true if the Response needs to be parsed, false otherwise |
Handles a Surrogate from the cache.
HttpCache | $cache | An HttpCache instance |
string | $uri | The main URI |
string | $alt | An alternative URI |
bool | $ignoreErrors | Whether to ignore errors or not |
string |
RuntimeException | |
Exception |
Remove the Surrogate from the Surrogate-Control header.
Response | $response |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/HttpCache/AbstractSurrogate.html