PopulatorData
2 months ago
AccessControl.php
2 years ago
Activator.php
2 months ago
AssetsLoader.php
2 weeks ago
Capabilities.php
2 months ago
Changelog.php
2 months ago
DeactivationPoll.php
3 years ago
DeferredAdminNotices.php
2 months ago
Env.php
6 months ago
Hooks.php
1 month ago
HooksWooCommerce.php
1 month ago
Initializer.php
1 month ago
Installer.php
10 months ago
Localizer.php
3 years ago
Menu.php
1 month ago
PersonalDataErasers.php
1 month ago
PersonalDataExporters.php
1 month ago
PluginActivatedHook.php
3 years ago
Populator.php
2 weeks ago
PrivacyPolicy.php
1 month ago
Renderer.php
1 year ago
RendererFactory.php
3 years ago
RequirementsChecker.php
2 months ago
Router.php
2 months ago
ServicesChecker.php
3 years ago
Shortcodes.php
1 month ago
SilentUpgraderSkin.php
3 years ago
SubscriberChangesNotifier.php
2 months ago
TranslationUpdater.php
3 months ago
TwigEnvironment.php
1 year ago
TwigFileSystemCache.php
3 years ago
Updater.php
4 days ago
index.php
3 years ago
TwigEnvironment.php
24 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Config; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoetVendor\Twig\Environment; |
| 9 | |
| 10 | class TwigEnvironment extends Environment { |
| 11 | |
| 12 | |
| 13 | private $templateClassPrefix = '__TwigTemplate_'; |
| 14 | |
| 15 | /** |
| 16 | * The original Environment of twig generates the class depending on PHP_VERSION. |
| 17 | * We need to produce the same class regardless of PHP_VERSION. Therefore, we |
| 18 | * overwrite this method. |
| 19 | **/ |
| 20 | public function getTemplateClass(string $name, ?int $index = null): string { |
| 21 | return $this->templateClassPrefix . \hash('sha256', $name) . (null === $index ? '' : '___' . $index); |
| 22 | } |
| 23 | } |
| 24 |