Linux srv25.usacloudserver.us 5.14.0-570.39.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 4 05:08:52 EDT 2025 x86_64
LiteSpeed
Server IP : 23.137.84.82 & Your IP : 216.73.216.127
Domains :
Cant Read [ /etc/named.conf ]
User : epicgamerzoneco
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
cpguard /
app /
vendor /
twig /
twig /
src /
Extension /
Delete
Unzip
Name
Size
Permission
Date
Action
AbstractExtension.php
1.33
KB
-rw-r--r--
2025-05-08 04:26
AttributeExtension.php
6.56
KB
-rw-r--r--
2025-05-08 04:26
CoreExtension.php
71.5
KB
-rw-r--r--
2025-05-08 04:26
DebugExtension.php
1.59
KB
-rw-r--r--
2024-09-27 07:26
EscaperExtension.php
6.82
KB
-rw-r--r--
2025-05-08 04:26
ExtensionInterface.php
1.92
KB
-rw-r--r--
2025-05-08 04:26
GlobalsInterface.php
470
B
-rw-r--r--
2024-09-27 07:26
LastModifiedExtensionInterface.php
613
B
-rw-r--r--
2025-05-08 04:26
OptimizerExtension.php
539
B
-rw-r--r--
2024-09-27 07:26
ProfilerExtension.php
1.02
KB
-rw-r--r--
2024-09-27 07:26
RuntimeExtensionInterface.php
326
B
-rw-r--r--
2024-09-27 07:26
SandboxExtension.php
4.47
KB
-rw-r--r--
2025-05-08 04:26
StagingExtension.php
2.42
KB
-rw-r--r--
2024-09-27 07:26
StringLoaderExtension.php
1.01
KB
-rw-r--r--
2024-09-27 07:26
YieldNotReadyExtension.php
588
B
-rw-r--r--
2024-09-27 07:26
Save
Rename
<?php /* * This file is part of Twig. * * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Twig\Extension; use Twig\Environment; use Twig\FileExtensionEscapingStrategy; use Twig\Node\Expression\ConstantExpression; use Twig\Node\Expression\Filter\RawFilter; use Twig\Node\Node; use Twig\NodeVisitor\EscaperNodeVisitor; use Twig\Runtime\EscaperRuntime; use Twig\TokenParser\AutoEscapeTokenParser; use Twig\TwigFilter; final class EscaperExtension extends AbstractExtension { private $environment; private $escapers = []; private $escaper; private $defaultStrategy; /** * @param string|false|callable $defaultStrategy An escaping strategy * * @see setDefaultStrategy() */ public function __construct($defaultStrategy = 'html') { $this->setDefaultStrategy($defaultStrategy); } public function getTokenParsers(): array { return [new AutoEscapeTokenParser()]; } public function getNodeVisitors(): array { return [new EscaperNodeVisitor()]; } public function getFilters(): array { return [ new TwigFilter('escape', [EscaperRuntime::class, 'escape'], ['is_safe_callback' => [self::class, 'escapeFilterIsSafe']]), new TwigFilter('e', [EscaperRuntime::class, 'escape'], ['is_safe_callback' => [self::class, 'escapeFilterIsSafe']]), new TwigFilter('raw', null, ['is_safe' => ['all'], 'node_class' => RawFilter::class]), ]; } public function getLastModified(): int { return max( parent::getLastModified(), filemtime((new \ReflectionClass(EscaperRuntime::class))->getFileName()), ); } /** * @deprecated since Twig 3.10 */ public function setEnvironment(Environment $environment): void { $triggerDeprecation = \func_num_args() > 1 ? func_get_arg(1) : true; if ($triggerDeprecation) { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated and not needed if you are using methods from "Twig\Runtime\EscaperRuntime".', __METHOD__); } $this->environment = $environment; $this->escaper = $environment->getRuntime(EscaperRuntime::class); } /** * @return void * * @deprecated since Twig 3.10 */ public function setEscaperRuntime(EscaperRuntime $escaper) { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated and not needed if you are using methods from "Twig\Runtime\EscaperRuntime".', __METHOD__); $this->escaper = $escaper; } /** * Sets the default strategy to use when not defined by the user. * * The strategy can be a valid PHP callback that takes the template * name as an argument and returns the strategy to use. * * @param string|false|callable(string $templateName): string $defaultStrategy An escaping strategy */ public function setDefaultStrategy($defaultStrategy): void { if ('name' === $defaultStrategy) { $defaultStrategy = [FileExtensionEscapingStrategy::class, 'guess']; } $this->defaultStrategy = $defaultStrategy; } /** * Gets the default strategy to use when not defined by the user. * * @param string $name The template name * * @return string|false The default strategy to use for the template */ public function getDefaultStrategy(string $name) { // disable string callables to avoid calling a function named html or js, // or any other upcoming escaping strategy if (!\is_string($this->defaultStrategy) && false !== $this->defaultStrategy) { return \call_user_func($this->defaultStrategy, $name); } return $this->defaultStrategy; } /** * Defines a new escaper to be used via the escape filter. * * @param string $strategy The strategy name that should be used as a strategy in the escape call * @param callable(Environment, string, string): string $callable A valid PHP callable * * @return void * * @deprecated since Twig 3.10 */ public function setEscaper($strategy, callable $callable) { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated, use the "Twig\Runtime\EscaperRuntime::setEscaper()" method instead (be warned that Environment is not passed anymore to the callable).', __METHOD__); if (!isset($this->environment)) { throw new \LogicException(\sprintf('You must call "setEnvironment()" before calling "%s()".', __METHOD__)); } $this->escapers[$strategy] = $callable; $callable = function ($string, $charset) use ($callable) { return $callable($this->environment, $string, $charset); }; $this->escaper->setEscaper($strategy, $callable); } /** * Gets all defined escapers. * * @return array<string, callable(Environment, string, string): string> An array of escapers * * @deprecated since Twig 3.10 */ public function getEscapers() { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated, use the "Twig\Runtime\EscaperRuntime::getEscaper()" method instead.', __METHOD__); return $this->escapers; } /** * @return void * * @deprecated since Twig 3.10 */ public function setSafeClasses(array $safeClasses = []) { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated, use the "Twig\Runtime\EscaperRuntime::setSafeClasses()" method instead.', __METHOD__); if (!isset($this->escaper)) { throw new \LogicException(\sprintf('You must call "setEnvironment()" before calling "%s()".', __METHOD__)); } $this->escaper->setSafeClasses($safeClasses); } /** * @return void * * @deprecated since Twig 3.10 */ public function addSafeClass(string $class, array $strategies) { trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated, use the "Twig\Runtime\EscaperRuntime::addSafeClass()" method instead.', __METHOD__); if (!isset($this->escaper)) { throw new \LogicException(\sprintf('You must call "setEnvironment()" before calling "%s()".', __METHOD__)); } $this->escaper->addSafeClass($class, $strategies); } /** * @internal * * @return array<string> */ public static function escapeFilterIsSafe(Node $filterArgs) { foreach ($filterArgs as $arg) { if ($arg instanceof ConstantExpression) { return [$arg->getAttribute('value')]; } return []; } return ['html']; } }