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 (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:----1KB2/qhj/MfJR/KvXGVTMQ2GHE/n+i8MtZnjP0qs525JGeQd9jgvhJ4spL5NFOuqegbKtI0FUmC4696JbwiS5Yr3BqJmWgTGC+EQ8S7p7kZFZUYW96cWzcRFOkhypK8wFNSraZ4ogEqfEd6FhBEKxfz5r9LPcMfUPGZ42xnG9Wjte08/ZLczwGj2p8DYR7I4RuHIwkYI1jASXaN8TS3UWF0px2zSjE5OHBX1ul20j/rN2AvfwRpvIHLFnNPfHCfZcxsZlURnyqSgtd9R++mNnmKNU8ODiFTFTmkRLUtzpywfhLaEzrKmdKjloXQ1Wwoghh1bHtAa79otJMBCz9Wx48aU09doM7stNwL0RAfjUh7RwjgnFTp5eg7SmEYHUVyR0QBIcS/lw8NoT01ENuAPfat02/eacg7pNetnwu3LFQCAId4MhW+wAmtTsPQAXkMqWbfJBvSQ+oTFp6wKvS4/XIGxmBNaMHJ6KfVMQ20ynZdGin2ednC8txpzlpIZpCq007rjotmRI9jkrYXCyismEPCIMj7vC0pO0Smny3n9cgq5o0KHdx/lX8HoMmaAlXJXcvuB4UqIFFYIoXR2NeTLyS/PRLFXpLIlCA7fTn5Wbils9j/Zy8nJop7hBarLToRIWa+o+394v8dcFwQuzuShvqxxQNelLHDs7XpAEUh+cik=----ATTACHMENT:----ODUwMDA5MTY1MjY3NjM3MiA3OTYyMDA2MTI0MDIwNDQ2IDU5MTA2NjUyMjc3NTU3MTg=