mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-21 14:17:49 +09:00
Updates to vendors etc
This commit is contained in:
@@ -24,20 +24,15 @@ use Twig\Environment;
|
||||
*/
|
||||
class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
{
|
||||
private ?string $globalDefaultTemplate;
|
||||
private ?UriSigner $signer;
|
||||
private ?Environment $twig;
|
||||
private string $charset;
|
||||
|
||||
/**
|
||||
* @param string|null $globalDefaultTemplate The global default content (it can be a template name or the content)
|
||||
*/
|
||||
public function __construct(?Environment $twig = null, ?UriSigner $signer = null, ?string $globalDefaultTemplate = null, string $charset = 'utf-8')
|
||||
{
|
||||
$this->twig = $twig;
|
||||
$this->globalDefaultTemplate = $globalDefaultTemplate;
|
||||
$this->signer = $signer;
|
||||
$this->charset = $charset;
|
||||
public function __construct(
|
||||
private ?Environment $twig = null,
|
||||
private ?UriSigner $signer = null,
|
||||
private ?string $globalDefaultTemplate = null,
|
||||
private string $charset = 'utf-8',
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +74,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
if (\count($attributes) > 0) {
|
||||
$flags = \ENT_QUOTES | \ENT_SUBSTITUTE;
|
||||
foreach ($attributes as $attribute => $value) {
|
||||
$renderedAttributes .= sprintf(
|
||||
$renderedAttributes .= \sprintf(
|
||||
' %s="%s"',
|
||||
htmlspecialchars($attribute, $flags, $this->charset, false),
|
||||
htmlspecialchars($value, $flags, $this->charset, false)
|
||||
@@ -87,7 +82,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
}
|
||||
}
|
||||
|
||||
return new Response(sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
return new Response(\sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
|
||||
Reference in New Issue
Block a user