Unwraps options, if needed, and returns them.

@return ConfigurationInterface
322025
private function unwrappedOptions()
    {
        if (!($this->options instanceof ConfigurationInterface)) {
            $this->options = ConfigurationProvider::unwrap($this->options);
        }
        return $this->options;
    }
951523
public function getExecOptionsResolver()
    {
        if (null === $this->execOptionsResolver) {
            if (null !== $this->parent) {
                $this->execOptionsResolver = clone $this->parent->getExecOptionsResolver();
            } else {
                $this->execOptionsResolver = new OptionsResolver();
            }

            $this->innerType->setExecOptions($this->execOptionsResolver);

            foreach ($this->typeExtensions as $extension) {
                $extension->setExecOptions($this->execOptionsResolver);
            }
        }

        return $this->execOptionsResolver;
    }
27032
protected function getConfig()
    {
        if ($this->config !== null) {
            return $this->config;
        }

        $this->config = $this->getDefaultConfig();

        $app = $this->getContainer();

        $file = $app['filesystem']->getFile(strtolower("extensions_config://{$this->getName()}.{$this->getVendor()}.yml"));

        if (!$file->exists()) {
            try {
                $this->copyDistFile($file);
            } catch (RuntimeException $e) {
                return $this->config;
            }
        }

        $this->addConfig($file);

        $localFile = $file->getParent()->getFile($file->getFilename('.yml') . '_local.yml');
        if ($localFile->exists()) {
            $this->addConfig($localFile);
        }

        return $this->config;
    }
30040
public function unwrap()
    {
        $iterator = $this->_innerIterator;

        if ($iterator instanceof CollectionInterface) {
            $iterator = $iterator->unwrap();
        }

        if (get_class($iterator) !== ArrayIterator::class) {
            return $this;
        }

        // ArrayIterator can be traversed strictly.
        // Let's do that for performance gains

        $callback = $this->_condition;
        $res = [];

        foreach ($iterator as $k => $v) {
            if ($callback($v, $k, $iterator)) {
                break;
            }
            $res[$k] = $v;
        }

        return new ArrayIterator($res);
    }
1321526
protected function getOtherConfig()
    {
        if (!isset($this->objOtherConfig)) {
            $this->objOtherConfig = $this
                ->getEnvironment()
                ->getBaseConfigRegistry()
                ->getBaseConfig();

            $this
                ->getPanel()
                ->getContainer()
                ->initialize($this->objOtherConfig, $this);
        }

        return $this->objOtherConfig;
    }
731356
public function getConfig() {
		if ($this->_config !== null) {
			return $this->_config;
		}
		
		// Local config
		if ($this->_configLocal === null && method_exists($this, 'getLocalConfig') && $this->hasConfigsFactory()) {
			$localConfigSrc = $this->getLocalConfig();
			$configsFactory = $this->getConfigsFactory();

			if (is_array($localConfigSrc)) {
				$this->_configLocal = $configsFactory->create($localConfigSrc);
			}
			else if (is_string($localConfigSrc)) {
				$this->_configLocal = $configsFactory->createFromFile($localConfigSrc);
			}
			else {
				throw new NoConfig('Type of a local config\'s source must be an array or a string');
			}
			
			$this->_config = clone $this->_configLocal;
		}

		// Supplied config
		if ($this->_configSupplied === null && $this instanceof LocatorAwareInterface && $this->hasLocator()) {
			$locator  = $this->getLocator();
			$configId = $this->getConfigServiceId();
			
			if ($locator->has($configId)) {
				$this->_configSupplied = $locator->get($configId);
				
				if (! $this->_configSupplied instanceof ConfigInterface) {
					throw new NoConfig('Config must implement the "ConfigInterface"');
				}
			}
		}

		// Merge supplied config
		if ($this->_configSupplied !== null) {
			if ($this->_config === null) {
				$this->_config = clone $this->_configSupplied;
			} else {
				$this->_config = $this->_config->merge($this->_configSupplied);
			}
		}

		// Still no final config ?
		if ($this->_config === null) {
			throw new NoConfig('Unable to provide the config');
		}
		
		return $this->_config;
	}
252087
public function getConfig($options = null)
    {
        if ($options === null) {
            return $this->checkMode;
        }

        return $this->checkMode & $options;
    }
778084
private function loadConfiguration() {

		$config = $this->configWrapper->configuration();

		$this->configWrapper->loadGlobalConfig( $config );
		$this->configWrapper->loadProjectConfig( $config );

		$event = new ConfigurationLoadedEvent();
		$event->setConfiguration( $config );
		$this->eventDispatcher->dispatch( $event::NAME, $event );

		return $config;
	}
426892
private function compileConfiguration()
    {
        $code = '';
        $configurationByWrapper = [];
        foreach ($this->configurations as $key => $configuration) {
            if(!isset($configurationByWrapper[$configuration->getIdWrapper()])){
                $configurationByWrapper[$configuration->getIdWrapper()] = [];
            }
            $data = array();
            $data['key'] = $configuration->getKey();
            $data['value'] = $configuration->getValue();
            $data['active'] = $configuration->getActive();
            $data['id'] = $configuration->getId();
            $configurationByWrapper[$configuration->getIdWrapper()][] = $data;
        }
        foreach ($configurationByWrapper as $id => $data) {
            $code .= sprintf("'%s' => %s,",$id,var_export($data,true));
        }

        return $code;
    }
615168
private function getWrappedOptions()
    {
        $ret = [];
        foreach (array_keys($this->options) as $option) {
            $ret[] = var_export($option, true);
        }
        return $ret;
    }
459060
private function getConfiguration()
    {
        return array_merge(
            [
                'fileMimeTypeField' => false,
                'fileNameField'     => false,
                'filePathField'     => false,
                'fileSizeField'     => false,
            ],
            $this->classMetadata->getExtension(UploadableDriver::EXTENSION_NAME),
            [
                'uploadable'        => true,
                'allowOverwrite'    => $this->allowOverwrite,
                'appendNumber'      => $this->appendNumber,
                'path'              => $this->path,
                'pathMethod'        => $this->pathMethod,
                'callback'          => $this->callback,
                'filenameGenerator' => $this->filenameGenerator,
                'maxSize'           => (float) $this->maxSize,
                'allowedTypes'      => $this->allowedTypes,
                'disallowedTypes'   => $this->disallowedTypes,
            ]
        );
    }
313307
public function getOptions()
    {
        $options = parent::getOptions();

        $options['upsert'] = $this->upsert;
        $options['multiple'] = $this->multiple;

        return $options;
    }
68203
public function getConfig()
    {
        $config = array(
            'label' => $this->getI18nLabel(),
            'icon' => $this->getIcon(),
            'buttonClasses' => $this->getButtonClasses(),
            'xhr' => $this->getXhr(),
            'destructive' => $this->getDestructive()
        );
        return $config;
    }
285752
public function fetch($options = array()) {
        $options = new Values($options);

        $params = Values::of(array('UiVersion' => $options['uiVersion'], ));

        $payload = $this->version->fetch(
            'GET',
            $this->uri,
            $params
        );

        return new ConfigurationInstance($this->version, $payload);
    }
819677
public function getConfig()
    {
        $config = [];
        foreach ($this->providers as $key => $provider) {
            $config[$key] = $provider->getConfig();
        }

        return $config;
    }
1002850
public function getOptions()
    {
        $options = [
            'name'     => $this->name,
            'sparse'   => is_bool($this->sparse) ? $this->sparse : false,
            'dropDups' => $this->dropDuplicates,
            'unique'   => $this->unique
        ];

        if (is_array($this->sparse)) {
            $options['partialFilterExpression'] = $this->sparse;
        }

        return $options;
    }
43913
public static function configurator()
    {
        //====================================================================//
        // Configuration Array Already Exists
        //====================================================================//
        if (isset(self::core()->configurator)) {
            return self::core()->configurator;
        }

        //====================================================================//
        // Load Configurator Class Name from Configuration
        $className = self::configuration()->Configurator;
        //====================================================================//
        // No Configurator Defined
        if (!is_string($className) || empty($className)) {
            return new NullConfigurator();
        }
        //====================================================================//
        // Validate Configurator Class Name
        if (false == self::validate()->isValidConfigurator($className)) {
            return new NullConfigurator();
        }

        //====================================================================//
        // Initialize Configurator
        self::core()->configurator = new $className();

        return self::core()->configurator;
    }