package and depencies
This commit is contained in:
15
vendor/symfony/http-kernel/HttpCache/Esi.php
vendored
15
vendor/symfony/http-kernel/HttpCache/Esi.php
vendored
@@ -27,14 +27,11 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class Esi extends AbstractSurrogate
|
||||
{
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return 'esi';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addSurrogateControl(Response $response)
|
||||
{
|
||||
if (str_contains($response->getContent(), '<esi:include')) {
|
||||
@@ -42,10 +39,7 @@ class Esi extends AbstractSurrogate
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '')
|
||||
public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = ''): string
|
||||
{
|
||||
$html = sprintf('<esi:include src="%s"%s%s />',
|
||||
$uri,
|
||||
@@ -60,10 +54,7 @@ class Esi extends AbstractSurrogate
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function process(Request $request, Response $response)
|
||||
public function process(Request $request, Response $response): Response
|
||||
{
|
||||
$type = $response->headers->get('Content-Type');
|
||||
if (empty($type)) {
|
||||
|
Reference in New Issue
Block a user