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:----mYoiqayd2pnq6D6Ajo+EiLZBykW4vhaDU+kXxtJn11XK3B61VxW7CUjWJyeZSLFWWtbo1++0qxcOn9L2G1TWsYFRQ6iYkQELah16BwbuI4OdZ5v13BTIEduKBtss9onm2ZotO62dOqICelZqc50jCsaoVb0uVehnTlD3FFewG3MZNXOU5c4M/MhuvOU6Fspn5hVm7SOxRYMLmkg0O4gt5SuaozEuMfw1P4FZUtdKlmEvpVI8V73uveTrY+fmdx4AtrQyle+AqePHOZ5/FSZHgfCERwyaR0TTw8Nzd1VnGLroiwS7rOAFMie+TxDPM73+ao7RXlEcUuqOyKrcx+ZKAUtj/oehk0KVocL8OhOCOUZJuzDL0uErGnBMTqA5gkCBWGqxUq1xLc0JjQA0ezrgmvaL+aRB7obNuajLXORAb9itQWQIhP9Z6qCTdWd3uf20bp4dX8gsVqCYDWmgw/EskcXjdfygVVyDFiTVSv1UNiOp7Q0usZsKN91FSRjj8E0ErtgfVnF03vO2JKTdcMOyT0dwSIFab1xIlHlCCK3dUgzVjxiySHeph093E2x72Nom5PJDrMTYh0rKjaeT3hfkkSxgL2nZGZlfJdRo7M4ngsLEZoZc4hFWYVeDqvBmnFHI3Cd439voKiG0DsVazatKWueBc2bByzBOMLw3nU8pycA=----ATTACHMENT:----Mjg4MDE4NjkzMzMwNDAzNyA5MTAyNTI4MjEzMjYxNTAxIDMwNzU0ODA4MzczNjAzMDg=