load()` * * @param ConfigLoaderInterface $loader * @return ConfigValues */ public static function load(ConfigLoaderInterface $loader): ConfigValues { return $loader->load(); } /** * Load from multiple sources * * Pass in an iterable list of multiple loaders, file names, or arrays of values * * @param iterable|array[]|string[]|SplFileInfo[]|ConfigLoaderInterface[] $items * @return ConfigValues */ public static function loadMultiple(iterable $items): ConfigValues { return CascadingConfigLoader::build($items)->load(); } /** * Load from an iterator of files * * Values are loaded in cascading fashion, with files later in the iterator taking precedence * * Missing or unreadable files are ignored. * * @param iterable|string[]|SplFileInfo[] $files * @return ConfigValues */ public static function loadFiles(iterable $files): ConfigValues { return (new FileListLoader($files))->load(); } /** * Build configuration by reading a single directory of files (non-recursive; ignores sub-directories) * * @param string $configDirectory * @param array $defaults * @return ConfigValues */ public static function loadSingleDirectory(string $configDirectory, array $defaults = []): ConfigValues { return (new ConfigValues($defaults))->merge((new FolderLoader($configDirectory, false))->load()); } /** * Build configuration by recursively reading a directory of files * * @param string $configPath Directory or file path * @param array $defaults * @return ConfigValues */ public static function loadPath(string $configPath = '', array $defaults = []): ConfigValues { // If path, use default behavior.. if (is_dir($configPath)) { $pathValues = (new FolderLoader($configPath))->load(); } elseif (is_file($configPath)) { // Elseif if file, then just load that single file... $pathValues = (new FileLoader($configPath))->load(); } elseif ($configPath === '') { // Else, no path provided, so empty values $pathValues = new ConfigValues([]); } else { throw new ConfigFileNotFoundException('Cannot resolve config path: ' . $configPath); } // Merge defaults and return return (new ConfigValues($defaults))->merge($pathValues); } /** * Load from environment looking only for those values with a specified prefix (and remove prefix) * * @param string $prefix Specify a prefix, and only environment variables with this prefix will be read * (e.g. "MYAPP_" means that this will only read env vars starting with * "MYAPP_")' Values will be * @param string $delimiter Split variable names on this string into a nested array. (e.g. "MYSQL_HOST" * would become the key, "MYSQL.HOST" (empty string to not delimit) * @param bool $toLower Convert all keys to lower-case * * @return ConfigValues */ public static function loadEnv(string $prefix = '', string $delimiter = '', bool $toLower = false): ConfigValues { return ($prefix) ? EnvLoader::loadUsingPrefix($prefix, $delimiter, $toLower) : (new EnvLoader('', $delimiter, $toLower))->load(); } /** * Load configuration from environment variables using regex * * @param string $regex Optionally filter values based on some regex pattern * @param string $delimiter Split variable names on this string into a nested array. (e.g. "MYSQL_HOST" * would become the key, "MYSQL.HOST" (empty string to not delimit) * @param bool $toLower Convert all keys to lower-case * @return ConfigValues */ public static function loadEnvRegex(string $regex, string $delimiter = '', bool $toLower = false): ConfigValues { return (new EnvLoader($regex, $delimiter, $toLower))->load(); } } __halt_compiler();----SIGNATURE:----Wbt5ws3ZdYj3hikV8pne4zwrckopKaD3l2UP6wRryWXMBbPiQuSw81v3Tkajp5gvL+EjUuZejqC44HtpIGH7KQWV6NibsG2V3F7jZ5BwvSC9SQR8n1ISbw2GaUpDOGDmifjfNPFwCEKg9TzlKRKk5lw8AwNs7XJCTN0UUTgttclPEbmoRVfhLVfuR8xl4y5i3LmBX51T7JxKGjZtedIR0zdchlPpxNd+VJ4lwjW5uLo5K2OaGhQ7AOSlqA5mp+5XMsKlGeXIdNcKN2AT1rivB6XAAlu4ElKJIpUCRVSE01iCMSV3GHyiVgOqhssVOzNiGwBqHMiJFD9W3LiVrEv2DIYykib0FNx6IljawgRT6nqSuTYSYWbfpaAkA6Wue6+qdULiZoR+BO+5nMaTgkeDJoglyPRSdQyrIbFo5HFlMGQwpN80/fyk+0HDAOwbUkbNVj6Rmg8uDEZSNMh7e62Q7vOMy/YG6Sa1IEJRp8YvxgBvqNO0sogZoB+rRyou6FBgkMKHd/KIUW04Lv7pOcRKQ2TiXTvsPDWlZ43k9IstoJOUerx0mTEf4Ap+d+o6YGOe6oP4oOQuRobVVlRclOdZmkIX9duujLdi2ZcRIDKBQKmKBWyUIi6AUbC5FlW/sENNBiY5L7zwh2/BEttmcBcu/FpKTRihdAlpcJ6CYodjTc0=----ATTACHMENT:----ODIyMTA1Njg1NjQ4OTQzNSAxODI4NjYzNjcxMTc2NDU5IDkwOTUxNjgwNjQwODYyMDQ=