Resolves an array of references

@param array $references
@return mixed
493511
public function resolveMany(array $references)
    {
        $convertedParameters = array();

        foreach ($references as $reference) {
            $convertedValue = $this->resolve($reference);
            $convertedParameters[] = $convertedValue;
        }

        return $convertedParameters;
    }
224887
protected function resolvePropertyReferences(array $value = []): array
    {
        $nodes = array_map(function ($nodeIdentifier) {
            return $this->context->getNodeByIdentifier($nodeIdentifier);
        }, $value);

        return array_filter($nodes);
    }
770956
protected function sortResolvers(array $resolvers)
    {
        usort($resolvers, function ($a, $b) {
            if ($a['priority'] == $b['priority']) {
                return 0;
            }

            return ($a['priority'] > $b['priority']) ? -1 : 1;
        });

        $sortedResolvers = [];
        foreach ($resolvers as $resolver) {
            $sortedResolvers[] = $resolver['resolver'];
        }

        return $sortedResolvers;
    }
63421
protected function resolveCallbacksForRoots(array $roots)
    {
        foreach ($roots as $i => $root) {
            $roots[$i] = $this->resolveCallbacksForRoot($root);
        }

        return $roots;
    }
986984
public function getDBRef(array $reference)
    {
        if ($this->eventManager->hasListeners(Events::preGetDBRef)) {
            $eventArgs = new EventArgs($this, $reference);
            $this->eventManager->dispatchEvent(Events::preGetDBRef, $eventArgs);
            $reference = $eventArgs->getData();
        }

        $result = $this->doGetDBRef($reference);

        if ($this->eventManager->hasListeners(Events::postGetDBRef)) {
            $eventArgs = new MutableEventArgs($this, $result);
            $this->eventManager->dispatchEvent(Events::postGetDBRef, $eventArgs);
            $result = $eventArgs->getData();
        }

        return $result;
    }
618275
protected function sortResolvers()
    {
        $sortedResolvers = array();
        krsort($this->resolvers);

        foreach ($this->resolvers as $resolvers) {
            $sortedResolvers = array_merge($sortedResolvers, $resolvers);
        }

        return $sortedResolvers;
    }
966578
public function resolveReferences(ReferenceContext $context = null)
    {
        foreach ($this->_paths as $key => $path) {
            if ($path === null) {
                continue;
            }
            $path->resolveReferences($context);
        }
    }
1047023
function getReference($table, $ref = null) {
		if (isset($this->references[$table])) {
			if (!strlen($ref)) {
				return current($this->references[$table]);
			}
			if (isset($this->references[$table][$ref])) {
				return $this->references[$table][$ref];
			}
		}
	}
1089640
protected function parseWithRelations(array $relations)
    {
        $results = [];

        foreach ($relations as $name => $constraints) {
            // If the "relation" value is actually a numeric key, we can assume that no
            // constraints have been specified for the eager load and we'll just put
            // an empty Closure with the loader so that we can treat all the same.
            if (is_numeric($name)) {
                $name = $constraints;

                list($name, $constraints) = (mb_strpos($name, ':') !== false)
                            ? $this->createSelectWithConstraint($name)
                            : [$name, function () {
                                //
                            }];
            }

            // We need to separate out any nested includes. Which allows the developers
            // to load deep relationships using "dots" without stating each level of
            // the relationship with its own key in the array of eager load names.
            $results = $this->addNestedWiths($name, $results);

            $results[$name] = $constraints;
        }

        return $results;
    }
1011918
public function resolve(array $settings = [])
    {
        return [
            'driver'              => 'pdo_sqlite',
            'user'                => Arr::get($settings, 'username'),
            'password'            => Arr::get($settings, 'password'),
            'prefix'              => Arr::get($settings, 'prefix'),
            'memory'              => $this->isMemory($settings),
            'path'                => Arr::get($settings, 'database'),
            'defaultTableOptions' => Arr::get($settings, 'defaultTableOptions', []),
        ];
    }
333198
protected function resolveOptions(array $options = array())
    {
        $resolver = new OptionsResolver;
        $this->setDefaultOptions($resolver);

        if (!empty($this->options)) {
            $resolver->setDefaults($this->options);
        }

        return $resolver->resolve($options);
    }
889995
public function getReferences()
    {

        // build links
        $references = array();

        foreach( $this->getAttributes() as $column ) {

            // A relation has a reference if one of its attributes is referenced by another
            if( $column->isUnique() and ( $refs = $column->getIsReferencedBy() ) ) {

                foreach( $refs as $reference ) {

                    $name = sprintf(
                        "%s.%s",
                        $reference->getRelation()->getEntityName(),
                        $reference->name
                    );

                    $references[$name] = array(
                        $reference->getRelation()->getEntityName(),
                        $reference->name,
                        $reference->isUnique() ? 0 : 1
                    );

                }

            }

        }

        return $references;

    }
969741
protected function getAdminExtensionReferenceByTypes(array $types)
    {
        $references = [];
        foreach ($types as $type) {
            $references[$type] = new Reference('sonata_translation.admin.extension.'.$type.'_translatable');
        }

        return $references;
    }
393423
protected function resolveReference($ref)
	{
		// @todo Better resolver (Only work with internal components atm)
		if (strpos($ref, '#/components/') !== 0) {
			throw new Exception('Can not resolve this $ref atm (todo) : ' . $ref);
		}

		$componentPath = str_replace('#/components/', '', $ref);
		$pathParts = explode('/', $componentPath);

		$target = $this->openApiFileContent['components'];
		$processingPathParts = ['#', 'components'];
		$targetName = '';
		foreach ($pathParts as $pathPart) {
			$processingPathParts[] = $pathPart;
			if (!isset($target[$pathPart])) {
				throw new Exception('Can not resolve $ref "' . $ref . '" : Segment not found at "' . implode('/', $processingPathParts) . '"');
			}
			$target = $target[$pathPart];
			$targetName = $pathPart;
		}

		return [
			'name' => $targetName,
			'target' => $target
		];
	}
233046
protected function _convertConstraintColumns($references)
    {
        if (is_string($references)) {
            return $this->_driver->quoteIdentifier($references);
        }

        return implode(', ', array_map(
            [$this->_driver, 'quoteIdentifier'],
            $references
        ));
    }
56736
protected function _reference($reference)
    {
        if (!is_string($reference)) {
            return $reference;
        }

        $pos = strrpos($reference, '\\');
        if ($pos !== false) {
            $namespace = substr($reference, 0, $pos);
            $basename = substr($reference, $pos + 1);
        } else {
            $namespace = null;
            $basename = $reference;
        }
        $substitute = null;
        $reference = Monkey::patched($namespace, $basename, false, $substitute);

        return $substitute ?: $reference;
    }
783545
public function findByReference(Reference $reference)
    {
        try {
            $object = $this->getCachedDataByReference($reference);
        } catch (CacheMissException $e) {
            if ($object = $this->rm->getRepositoryForClassName($reference->getClassName())->findById($reference->getId())) {
                $object = clone $object;
                $this->setCachedData($reference->getClassName(), $reference->getId(), $object);
                $this->mm->getMetadataForObject($object)->prepareToLoad($this, $object);
            }
        }

        return $object;
    }