Vinkla\Backup\ProfileRegistryFactory::getConfig PHP Method

getConfig() protected method

Get the configuration data.
protected getConfig ( array $config ) : array
$config array
return array
    protected function getConfig(array $config) : array
    {
        if (!array_key_exists('profiles', $config)) {
            throw new InvalidArgumentException('Missing configuration key [profiles].');
        }
        foreach (array_get($config, 'profiles') as $profile) {
            $keys = ['sources', 'destinations', 'processor', 'namer'];
            foreach ($keys as $key) {
                if (!array_key_exists($key, $profile)) {
                    throw new InvalidArgumentException("Missing profile configuration key [{$key}].");
                }
            }
        }
        return $config;
    }