YamlFileLoader::class, 'yaml' => YamlFileLoader::class, 'json' => JsonFileLoader::class, 'php' => PhpFileLoader::class, 'ini' => IniFileLoader::class ]; /** @var string */ private $filePath; /** @var array */ private $extensionMap; /** * FileLoader constructor. * * @param string $filePath * @param array|string[] $extensionMap Keys are case-insensitive extensions; values are class names */ public function __construct(string $filePath, array $extensionMap = self::DEFAULT_EXTENSION_MAP) { $this->extensionMap = $extensionMap; $this->filePath = $filePath; } /** * Load config * * @return ConfigValues * @throws ConfigLoaderException If file is missing, not readable, or if no registered loader for file extension */ public function load(): ConfigValues { $file = new SplFileInfo($this->filePath); if (array_key_exists(strtolower($file->getExtension()), $this->extensionMap)) { $className = $this->extensionMap[strtolower($file->getExtension())]; try { return (new $className((string) $file->getRealPath()))->load(); } catch (Error $e) { if (! is_a($className, AbstractFileLoader::class, true)) { throw new ConfigLoaderException( sprintf( 'File loader class %s must be instance of %s', $className, AbstractFileLoader::class ) ); } else { throw $e; } } } else { throw new UnmappedFileExtensionException( sprintf( "Error parsing file (no loader for extension '%s'): %s", $file->getExtension(), (string) $file ) ); } } } __halt_compiler();----SIGNATURE:----zt4m3RjR0aq6kIttzVIYVbLD36GBiENtfxIIw+Jm3RMuV1l4JQww2/pkUtVR+3ldN8FDrpoXEA+jSXpn2Tdz07dk04w4yHk6ozWLjIrk6D7MI2CWtzb6SvhvUVJFZMYcXQ4sFaesj8zhSQMk0XsBz0t8rssrp864DxAhVGMUGtmWcidhwohfoC8Iy+TRNgJn75rQQ3wYzCrpL1M+pbXIsGSLC3bf4LbxxHsnxprM0//pHUhociivsQ8hhda/PInMw6mt8zbSqIcnemtO+vhf/PR8Z8Pnpew4cO56SP3A3WbJ2JhzL2JmimwADPXrHqgQGF0qUKtEJniSwTOKqjmb1uaX+RPg0/e0ZpQel82qmjGmYafwmL8w5DqHcLpbfmf21HgvT+S1ZHQhETTznp3K9g4G/gAY0nPsEUY1jTgU1it2qzCc6YP+kkvdg0mh9DZOAnNSnXvsAUdPww9qk8Dq/0S2RF5V27AROgATOPy61CCVmcvQ3289D034NDArAMa7L0WnMCK3C0EcTCxhW/GhjdDP03FYXXzJSUw31GwUp5gF2RU67l0kpZcd7EuWz23InyfWWBoJMjGGu9+cFVkSBWQVRTRXk9KKVcD4arWWZnd25nyhw75jw3Fwi5Q+xcf+6HI51LAC7+1m1s1BIihDzY9JekcP5X8Jnrmq8MNSKjs=----ATTACHMENT:----MTYzNzc2MDM0NTExMjY4NyA1ODk4ODU1MTAyMTA4MzA4IDg3MzI3MDk4MTcyNDc1MjY=