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:----fo4d8I5GpcWHHDTDY7NTl65lkFZds2fW/JowiIfc2kRbCfF26ExBV+4Qsx1xuC5OYsDagYWKBOw+UKNku10p5NPovShcMll/udRpnr+S76/uu+Bu4ahTthpxFb7GOyz09j50bYOGoybYl7fi3uBvR/CanXVgZSj9TLH7uuiENgBN53UItErqfVR6+V5e/FBpZOfhJxXeDg9eOVTETndp/m8/3zPWfPxsJ2DQxDNM/XH6Ri2oK97XO7Rz+7OcKPu12ozDahRyQ6eC2ruCnxj/sBW9ixXK4mwmEKqTfkMqlhNCKp6uWyMtsxmmSPVHpyDY/NjhPX/4aPH/beiD/9YpR2kfnfihbJzipSnqVST25laVPoBiV6mGxTeaUPqdQY0C4f1jJnuUXuExOfHbY3FCPzZVSnuxKhcvvqHunV75pFD8uzw+DQv0Ps2r7dRbKr1rpvCoaEIGwYVRk7BRPGzk/2bie6OUyHBJ1CKjbhuUyZgxj/Qr6rCQ+e90mZTipGvLdMgga2dhtwA5VQW4EY5sfCjuZifSClNQ7HZ6oTyMyGh4M8toXbjYhXkSa8uGJIO2Y9VXOgzwKpF3cobYm9q1skXsZQArL0S85Iur5v4nNBp2zoeLQ2q9Sx2pPG1Y3kT1z386lIJJmdiC6HGmkyXUXmKywQ7IwFWW83i/BtSWZyU=----ATTACHMENT:----NzMzMzk0ODY2MDc4NTc2IDIzNTUzMjY4MzYyMjYxMCAxOTQwMzQ4OTI5NDg5NjAw