Behat\Testwork\ServiceContainer\Configuration\ConfigurationLoader::loadConfigs PHP Method

loadConfigs() private method

Loads configs for provided config and profile.
private loadConfigs ( string $basePath, array $config, string $profile ) : array
$basePath string
$config array
$profile string
return array
    private function loadConfigs($basePath, array $config, $profile)
    {
        $configs = array();
        // first load default profile from current config, but only if custom profile requested
        if ('default' !== $profile && isset($config['default'])) {
            $configs[] = $config['default'];
        }
        // then recursively load profiles from imports
        if (isset($config['imports']) && is_array($config['imports'])) {
            $configs = array_merge($configs, $this->loadImports($basePath, $config['imports'], $profile));
        }
        // then load specific profile from current config
        if (isset($config[$profile])) {
            $configs[] = $config[$profile];
            $this->profileFound = true;
        }
        return $configs;
    }