File "FactoryRuntimeLoader.php"

Full Path: /home/warrior1/public_html/wp-content-20241001222009/plugins/mailpoet/vendor-prefixed/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php
File size: 395 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
namespace MailPoetVendor\Twig\RuntimeLoader;
if (!defined('ABSPATH')) exit;
class FactoryRuntimeLoader implements RuntimeLoaderInterface
{
 private $map;
 public function __construct(array $map = [])
 {
 $this->map = $map;
 }
 public function load(string $class)
 {
 if (!isset($this->map[$class])) {
 return null;
 }
 $runtimeFactory = $this->map[$class];
 return $runtimeFactory();
 }
}