private static function getConfigurationDimensions(
        array $dimensions,
        $config,
        string $configClass,
        array $interfaces,
        ?string $configId
    ) {
        foreach ($dimensions as $dimension) {
            if ((array) $config !== $config && ! $config instanceof ArrayAccess) {
                throw new UnexpectedValueException($dimensions, $dimension);
            }

            if (! isset($config[$dimension])) {
                if (! isset($interfaces[RequiresMandatoryOptionsContract::class]) &&
                    isset($interfaces[ProvidesDefaultOptionsContract::class])
                ) {
                    break;
                }

                throw new OptionNotFoundException($configClass, $dimension, $configId);
            }

            $config = $config[$dimension];
        }

        return $config;
    }
private static function getConfigurationDimensions(
        array $dimensions,
        $config,
        string $configClass,
        array $interfaces,
        ?string $configId
    ) {
        foreach ($dimensions as $dimension) {
            if ((array) $config !== $config && ! $config instanceof ArrayAccess) {
                throw new UnexpectedValueException($dimensions, $dimension);
            }

            if (! isset($config[$dimension])) {
                if (! isset($interfaces[RequiresMandatoryOptionsContract::class]) &&
                    isset($interfaces[ProvidesDefaultOptionsContract::class])
                ) {
                    break;
                }

                throw new OptionNotFoundException($configClass, $dimension, $configId);
            }

            $config = $config[$dimension];
        }

        return $config;
    }
private static function getConfigurationDimensions ( array $ dimensions , $ config , string $ configClass , array $ interfaces , ? string $ configId ) { foreach ( $ dimensions as $ dimension ) { if ( ( array ) $ config !== $ config && ! $ config instanceof ArrayAccess ) { throw new UnexpectedValueException ( $ dimensions , $ dimension ) ; } if ( ! isset ( $ config [ $ dimension ] ) ) { if ( ! isset ( $ interfaces [ RequiresMandatoryOptionsContract :: class ] ) && isset ( $ interfaces [ ProvidesDefaultOptionsContract :: class ] ) ) { break ; } throw new OptionNotFoundException ( $ configClass , $ dimension , $ configId ) ; } $ config = $ config [ $ dimension ] ; } return $ config ; }
Get configuration for provided dimensions.

@param array              $dimensions
@param array|\ArrayAccess $config
@param string             $configClass
@param null|string        $configId
@param array              $interfaces

@throws \Viserio\Component\Contract\OptionsResolver\Exception\OptionNotFoundException
@throws \Viserio\Component\Contract\OptionsResolver\Exception\UnexpectedValueException

@return array|\ArrayAccess
Get configuration for provided dimensions .