Ssi
extends AbstractSurrogate
in package
Ssi implements the SSI capabilities to Request and Response instances.
Tags
Table of Contents
- $contentTypes : mixed
- $phpEscapeMap : mixed
- __construct() : mixed
- addSurrogateCapability() : mixed
- Adds Surrogate-capability to the given Request.
- addSurrogateControl() : mixed
- {@inheritdoc}
- createCacheStrategy() : ResponseCacheStrategyInterface
- Returns a new cache strategy instance.
- getName() : mixed
- {@inheritdoc}
- handle() : string
- Handles a Surrogate from the cache.
- hasSurrogateCapability() : bool
- Checks that at least one surrogate has Surrogate capability.
- needsParsing() : bool
- Checks that the Response needs to be parsed for Surrogate tags.
- process() : mixed
- {@inheritdoc}
- renderIncludeTag() : mixed
- {@inheritdoc}
- generateBodyEvalBoundary() : string
- removeFromControl() : mixed
- Remove the Surrogate from the Surrogate-Control header.
Properties
$contentTypes
protected
mixed
$contentTypes
$phpEscapeMap
protected
mixed
$phpEscapeMap
= [['<?', '<%', '<s', '<S'], ['<?php echo "<?"; ?>', '<?php echo "<%"; ?>', '<?php echo "<s"; ?>', '<?php echo "<S"; ?>']]
Methods
__construct()
public
__construct([array<string|int, mixed> $contentTypes = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml'] ]) : mixed
Parameters
- $contentTypes : array<string|int, mixed> = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml']
-
An array of content-type that should be parsed for Surrogate information (default: text/html, text/xml, application/xhtml+xml, and application/xml)
Return values
mixed —addSurrogateCapability()
Adds Surrogate-capability to the given Request.
public
addSurrogateCapability(Request $request) : mixed
Parameters
- $request : Request
Return values
mixed —addSurrogateControl()
{@inheritdoc}
public
addSurrogateControl(Response $response) : mixed
Parameters
- $response : Response
Return values
mixed —createCacheStrategy()
Returns a new cache strategy instance.
public
createCacheStrategy() : ResponseCacheStrategyInterface
Return values
ResponseCacheStrategyInterface —getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —handle()
Handles a Surrogate from the cache.
public
handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors) : string
Parameters
- $cache : HttpCache
- $uri : string
- $alt : string
-
An alternative URI
- $ignoreErrors : bool
Return values
string —hasSurrogateCapability()
Checks that at least one surrogate has Surrogate capability.
public
hasSurrogateCapability(Request $request) : bool
Parameters
- $request : Request
Return values
bool —needsParsing()
Checks that the Response needs to be parsed for Surrogate tags.
public
needsParsing(Response $response) : bool
Parameters
- $response : Response
Return values
bool —process()
{@inheritdoc}
public
process(Request $request, Response $response) : mixed
Parameters
Return values
mixed —renderIncludeTag()
{@inheritdoc}
public
renderIncludeTag(string $uri[, string|null $alt = null ][, bool $ignoreErrors = true ][, string $comment = '' ]) : mixed
Parameters
- $uri : string
- $alt : string|null = null
- $ignoreErrors : bool = true
- $comment : string = ''
Return values
mixed —generateBodyEvalBoundary()
protected
static generateBodyEvalBoundary() : string
Return values
string —removeFromControl()
Remove the Surrogate from the Surrogate-Control header.
protected
removeFromControl(Response $response) : mixed
Parameters
- $response : Response