Parse the security settings data into an array

@param array $schemesArray

@return array
481933
private function parseSecuritySettings($schemesArray)
    {
        $securitySchemes = [];

        foreach ($schemesArray as $key => $securitySchemeData) {
            $parser = isset($this->securitySettingsParsers['*']) ? $this->securitySettingsParsers['*'] : false;

            $securitySchemes[$key] = $securitySchemeData;
            $securityScheme = $securitySchemes[$key];

            // If we're using protocol specific parsers, see if we have one to use.
            if ($this->configuration->isSchemaSecuritySchemeParsingEnabled()) {
                if (isset($securityScheme['type'], $this->securitySettingsParsers[$securityScheme['type']])
                    ) {
                    $parser = $this->securitySettingsParsers[$securityScheme['type']];
                }
            }

            // If we found a parser, create it's settings object.
            if ($parser) {
                $settings = isset($securityScheme['settings']) ? $securityScheme['settings'] : [];
                $securitySchemes[$key]['settings'] = $parser->createSecuritySettings($settings);
            }
        }

        return $securitySchemes;
    }
1007510
protected function parseCookies(): array
    {
        # cookies are encoded in the `cookie` header
        $header = $this->getHeader("cookie");
        if (empty($header)) {
            return [];
        }

        # create a data collection to gracefully handle arrays
        $options = $this->getDecoderOptions();
        $collection = new \sndsgd\http\data\Collection(
            $options->getMaxVars(),
            $options->getMaxNestingLevels()
        );

        foreach (explode(";", $header) as $cookie) {
            $cookie = trim($cookie);
            if ($cookie === "") {
                continue;
            }

            $pair = explode("=", $cookie, 2);
            if (!isset($pair[1]) || $pair[1] === "") {
                continue;
            }

            list($key, $value) = $pair;
            $collection->addValue(urldecode($key), urldecode($value));
        }

        return $collection->getValues();
    }
241611
public function checkIdPSettings($settings)
    {
        assert('is_array($settings)');

        if (!is_array($settings) || empty($settings)) {
            return array('invalid_syntax');
        }

        $errors = array();

        if (!isset($settings['idp']) || empty($settings['idp'])) {
            $errors[] = 'idp_not_found';
        } else {
            $idp = $settings['idp'];
            if (!isset($idp['entityId']) || empty($idp['entityId'])) {
                $errors[] = 'idp_entityId_not_found';
            }

            if (!isset($idp['singleSignOnService'])
                || !isset($idp['singleSignOnService']['url'])
                || empty($idp['singleSignOnService']['url'])
            ) {
                $errors[] = 'idp_sso_not_found';
            } else if (!filter_var($idp['singleSignOnService']['url'], FILTER_VALIDATE_URL)) {
                $errors[] = 'idp_sso_url_invalid';
            }

            if (isset($idp['singleLogoutService'])
                && isset($idp['singleLogoutService']['url'])
                && !empty($idp['singleLogoutService']['url'])
                && !filter_var($idp['singleLogoutService']['url'], FILTER_VALIDATE_URL)
            ) {
                $errors[] = 'idp_slo_url_invalid';
            }

            if (isset($settings['security'])) {
                $security = $settings['security'];

                $existsX509 = isset($idp['x509cert']) && !empty($idp['x509cert']);
                $existsMultiX509Sign = isset($idp['x509certMulti']) && isset($idp['x509certMulti']['signing']) && !empty($idp['x509certMulti']['signing']);
                $existsMultiX509Enc = isset($idp['x509certMulti']) && isset($idp['x509certMulti']['encryption']) && !empty($idp['x509certMulti']['encryption']);

                $existsFingerprint = isset($idp['certFingerprint']) && !empty($idp['certFingerprint']);
                if (!($existsX509 || $existsFingerprint || $existsMultiX509Sign)
                ) {
                    $errors[] = 'idp_cert_or_fingerprint_not_found_and_required';
                }
                if ((isset($security['nameIdEncrypted']) && $security['nameIdEncrypted'] == true)
                    && !($existsX509 || $existsMultiX509Enc)
                ) {
                    $errors[] = 'idp_cert_not_found_and_required';
                }
            }
        }

        return $errors;
    }
50192
private static function parseCookies(array $cookiesArray): RequestCookieCollectionInterface
    {
        $cookies = new RequestCookieCollection();

        foreach ($cookiesArray as $cookieName => $cookieValue) {
            $cookies->set(
                strval($cookieName),
                new RequestCookie(strval($cookieValue))
            );
        }

        return $cookies;
    }
233342
protected function parseComponentSettings()
    {
        $this->settings = $this->getSettingsAttribute();

        $manager = ComponentManager::instance();
        $components = [];
        foreach ($this->settings as $setting => $value) {
            if (!is_array($value)) {
                continue;
            }

            $settingParts = explode(' ', $setting);
            $settingName = $settingParts[0];

            $components[$setting] = $value;
            unset($this->settings[$setting]);
        }

        $this->settings['components'] = $components;
    }
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
614013
protected function parseUrlComponents(UrlSettings $settings) : array
    {
        return [
            'scheme'    => $this->getScheme($settings->scheme, $settings->domain),
            'domain'    => $this->getDomain($settings->domain),
            'path'      => $this->getPath($settings->path, $settings->trailingSlash),
            'query'     => $this->getQueryString($settings->query),
            'fragment'  => $this->getFragment($settings->fragment),
        ];
    }
1009170
public function toArray($useIdentifierKeys = null)
    {
        $originalUseIdentifierKeys = $this->useIdentifierKeys;
        $useIdentifierKeys = isset($useIdentifierKeys) ? (boolean) $useIdentifierKeys : $this->useIdentifierKeys;
        $cursor = $this;

        /* Let iterator_to_array() decide to use keys or not. This will avoid
         * superfluous RiakCursor::info() from the key() method until the
         * cursor position is tracked internally.
         */
        $this->useIdentifierKeys = true;

        $results = $this->retry(function() use ($cursor, $useIdentifierKeys) {
            return iterator_to_array($cursor, $useIdentifierKeys);
        }, true);

        $this->useIdentifierKeys = $originalUseIdentifierKeys;

        return $results;
    }
630949
public function injectSettings(array $settings)
    {
        if (isset($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration'])
            && is_array($settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration'])) {
            $this->openSSLConfiguration = $settings['security']['cryptography']['RSAWalletServicePHP']['openSSLConfiguration'];
        }

        if (isset($settings['security']['cryptography']['RSAWalletServicePHP']['keystorePath'])) {
            $this->keystorePathAndFilename = $settings['security']['cryptography']['RSAWalletServicePHP']['keystorePath'];
        } else {
            throw new MissingConfigurationException('The configuration setting Neos.Flow.security.cryptography.RSAWalletServicePHP.keystorePath is missing. Please specify it in your Settings.yaml file. Beware: This file must not be accessible by the public!', 1305711354);
        }

        if (isset($settings['security']['cryptography']['RSAWalletServicePHP']['paddingAlgorithm']) && is_int($settings['security']['cryptography']['RSAWalletServicePHP']['paddingAlgorithm'])) {
            $this->paddingAlgorithm = $settings['security']['cryptography']['RSAWalletServicePHP']['paddingAlgorithm'];
        } else {
            throw new SecurityException('The padding algorithm given in security.cryptography.RSAWalletServicePHP.paddingAlgorithm is not available.', 1556785429);
        }
    }
100632
public function getEncryptedArray(array $dataSubArray, $password): array
    {
        $plainText = $this->getFactory()->createComputopApiMapper()->getDataPlainText($dataSubArray);
        $length = mb_strlen($plainText);

        $encryptedArray[ComputopApiConfig::DATA] = $this->getBlowfishEncryptedValue(
            $plainText,
            $length,
            $password
        );

        $encryptedArray[ComputopApiConfig::LENGTH] = $length;

        return $encryptedArray;
    }
419905
protected function prepare_config( $arr ) {
		$result = [];

		if ( ! is_array( $arr ) ) {
			return $result;
		}

		$arr = array_merge( $this->get_default_config(), $arr );

		foreach ( $arr as $key => $value ) {
			$res          = $this->config( $key );
			$result[$key] = is_null( $res ) ? $value : $res;
		}

		return apply_filters( 'digster/config', $result );
	}
1231663
public function toArray(): array
    {
        return [
            'scheme'    => $this->scheme,
            'authority' => $this->authority,
            'path'      => $this->path,
            'query'     => $this->query,
            'fragment'  => $this->fragment
        ];
    }
711181
protected function parseModuleSettings($moduleSettings)
    {
        $settings = [];

        if (is_array($moduleSettings)) {
            foreach ($moduleSettings as $setting) {
                $settings[] = $setting['name'];
            }
        }

        return $settings;
    }
552711
public function toSoapRequestArray(): array
	{
		$configArray = $this->configArray();
		$data = parent::toArray();
		$withConfig = array_merge($configArray, $data);

		return DateTimeDeflater::processWithPaths(
			$withConfig,
			static::$dateTimePaths
		);
	}
1249032
protected function parseScopeArray(array $scopes)
    {
        $parsedScopes = [];

        foreach ($scopes as $scope) {
            if (is_string($scope) && $scope != '') {
                $parsedScopes[] = $scope;
            } else if ($scope instanceof IScope) {
                $parsedScopes[] =  $scope->getId();
            } else {
                throw new \InvalidArgumentException('Scopes has to be array of strings or OAuth2\Storage\IScope instances.');
            }
        }

        return $parsedScopes;
    }
346227
protected static function toggleSerializeScheme(array $scheme)
    {
        foreach ($scheme as $name => &$options) {
            if (is_array($options)) {
                foreach (ParasiticAgent::methods() as $method) {
                    self::toggleSerializeClosure($options, $method);
                }
            }
        }

        return $scheme;
    }
983346
function accessArray( $ignoreLimitIdentifier = false )
    {
        $accessArray = array();

        $policies = $this->attribute( 'policies' );
        foreach ( array_keys( $policies ) as $policyKey )
        {
            $accessArray = array_merge_recursive( $accessArray, $policies[$policyKey]->accessArray( $ignoreLimitIdentifier ) );
        }

        return $accessArray;
    }