public function registerMappings(ConfigInterface $config)
    {
        $configKeys = [
            static::STANDARD_ALIASES     => 'mapAliases',
            static::SHARED_ALIASES       => 'shareAliases',
            static::ARGUMENT_DEFINITIONS => 'defineArguments',
            static::ARGUMENT_PROVIDERS   => 'defineArgumentProviders',
            static::DELEGATIONS          => 'defineDelegations',
            static::PREPARATIONS         => 'definePreparations',
        ];
        try {
            foreach ($configKeys as $key => $method) {
                $$key = $config->hasKey($key)
                    ? $config->getKey($key) : [];
            }
            $standardAliases = array_merge(
                $sharedAliases,
                $standardAliases
            );
        } catch (Exception $exception) {
            throw new InvalidMappingsException(
                sprintf(
                    _('Failed to read needed keys from config. Reason: "%1$s".'),
                    $exception->getMessage()
                )
            );
        }

        try {
            foreach ($configKeys as $key => $method) {
                array_walk($$key, [$this, $method]);
            }
        } catch (Exception $exception) {
            throw new InvalidMappingsException(
                sprintf(
                    _('Failed to set up dependency injector. Reason: "%1$s".'),
                    $exception->getMessage()
                )
            );
        }
    }