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:----frsf6B/O/f/X3fdw0F4pgEcdjB110ukcJsi+eVrH3kUMQFCB6LFi9IL9qdXU55uTkIvBt+6Zp59yOw7hyowHqNQmEFCvWlAx37NxMxMlZx5bX0VOf6R5+rpvE1eoCONWG6BrNH85eeYEVrzNRp344nDZWPupRBWbH+4ADYZfMYHJ08iMh4MDxyDfColwJpronuJQeMEqdRC/2BJUnHRTHGXD6aUowK9rTgRxFSxBkwT4NXasvjcNMfsbizs0Qrgqp6WhGOASkXFTjm53vGDt07zfcwXxRwV4E0IFGcqsWA3wyEWADO6pVBJCZnPpa3p+STqwg4SqymJ7DSUQ5sY+TqnTQiUioaYrCCWUQtSA2wVnKhHF2Torp7038lxuZ5wIelxHJ9U13fcQrOtahLa4hz+3gEhdNtgLzbMyj9TCW1i363o1K9sal1IvTUKF1CVLMl5gLSxiX70nyRlawmaHkf9VrCMr9EWMqCzybSnOxQvZkWg+mqdd27PsB+b0K/TWeMzSfqF5Zcqyl8zze2a0MJagTKc8IDqb/jvnxqG7Ri8xDPjWwz4k/SnvYfWGVC+62RTjGmJJqEk7NF9HMVjU7gKvD9b5GIf2Z0HWhtNW6tj7UoSywrgQ0ShZmefoVJ0O/PVs9ysbtsd1JRmzfcIRG7wH00CcyeX0NWY6Ny+T/1c=----ATTACHMENT:----MzAyMDIyMjkzNDUwMDU1OCA5NzUzNjU4OTE2MTAxODQ2IDkzMzU1NDMyNDUzMDIxMTU=