@param OperandInterface[] $operands

@return array list($mappings, $values)
773699
protected function getMappingsAndValues($operands)
    {
        $mappings = [];
        $values   = [];

        foreach ($operands as $operand) {
            if ($operand instanceof Value) {
                $values[] = $operand;
            } elseif ($operand instanceof PathInterface) {
                $mapping = $operand->getMapping();

                if ($mapping !== null) {
                    $mappings[] = $mapping;
                }
            }
        }

        return [$mappings, $values];
    }
186213
public function toKeyValue(array $values)
    {
        $result = [];

        foreach ($values as $key => $value) {
            if (is_array($value)) {
                $result[$key] = $this->toKeyValue($value);
            } elseif (is_object($value)) {
                $result[$key] = $this->toKeyValue((array) $value);
            } else {
                $result[$key] = $value;
            }
        }

        return $result;
    }
868649
public function process(array $values)
    {
        $results = [];

        foreach ($values as $value) {
            list($rootPageUid, $mountPoint) = GeneralUtility::trimExplode(',',
                $value, true, 2);
            $results[] = $this->getSolrRootlineForPageId($rootPageUid,
                $mountPoint);
        }

        return $results;
    }
1175105
private function keyEntityArray(array $entities) : array
    {
        $keyedArray = [];

        foreach ($entities as $entity) {
            $keyedArray[$this->idAccessorRegistry->getEntityId($entity)] = $entity;
        }

        return $keyedArray;
    }
116553
public function setMappings(array $mappings) {
        $this->mappings = [];

        foreach ($mappings as $contentType => $dataClass) {
            $this->addMapping($contentType, $dataClass);
        }
    }
1319114
protected function findEmbeddedObjectRelations(array $relations): array
    {
        $embeddedRelations = [];

        foreach ($relations as $relation) {
            if ($relation->getRelation() instanceof EmbeddedObjectRelation) {
                $embeddedRelations[] = $relation->getRelation();

                $embeddedRelations = array_merge(
                    $embeddedRelations,
                    $this->findEmbeddedObjectRelations($relation->getRelation()->getMapper()->getDefinition()->getToOneRelationMappings())
                );
            }
        }

        return $embeddedRelations;
    }
829643
protected function mergeBindings(array ...$arrays): array {
		
		// at first blush, it seems like one could use something like array_merge()
		// to build our return value, but because that method would overwrite matching
		// keys in early arrays with values in the latter ones, we can't rely on it.
		// instead, what we actually want to do is flatten our $arrays which we've
		// learned to do here: http://stackoverflow.com/a/1320156/360838.
		
		$bindings = [];
		
		array_walk_recursive($arrays, function($x) use (&$bindings) {
			$bindings[] = $x;
		});
		
		return $bindings;
	}
628043
public function mutation($operation, $table, $mutation)
    {
        return [
            $operation => [
                'table' => $table,
                'columns' => array_keys($mutation),
                'values' => $this->mapper->encodeValuesAsSimpleType(array_values($mutation))
            ]
        ];
    }
230142
protected function convertColumnsToProperties(array $databaseValues)
    {
        $propertyValues = [];
        $propertyMap = $this->getPropertyMap();

        foreach ($databaseValues as $columnName => $value) {
            $conversionFunction = $propertyMap[$columnName]['cast'];

            $propertyValues[$propertyMap[$columnName]['name']] = $conversionFunction($value);
        }

        return $propertyValues;
    }
36431
public function getEmbeddedColumnsMappedTo(string $propertyName): array
    {
        $this->class->getProperty($propertyName);

        if (isset($this->propertyColumnNameMap[$propertyName])) {
            return [$this->propertyColumnNameMap[$propertyName]];
        }

        $relation = $this->getRelationMappedToProperty($propertyName);

        if ($relation) {
            return $relation->getParentColumnsToLoad();
        }

        throw InvalidOperationException::format('No columns mapped to property \'%s\'', $propertyName);
    }
220517
public function getBinds(&$binds = [])
    {
        foreach ($this->children as $child) {
            if ($child instanceof Parenthesis) {
                $child->getBinds($binds);
            }
        }
        foreach ($this->binds as $bind) {
            $binds[] = $bind;
        }

        return $binds;
    }
175321
public function removeByPropertyPattern($aProperties)
    {
        foreach ($this->aEntries as $sHash => $aEntry) {
            foreach ($aProperties as $aPatterns) {
                foreach ($aPatterns as $sProperty => $sPattern) {
                    if (!array_key_exists($sProperty, $aEntry)) {
                        continue 2;
                    } elseif (!preg_match('/^' . $sPattern . '$/i', $aEntry[$sProperty])) {
                        continue 2;
                    }
                }
                unset($this->aEntries[$sHash]);
            }
        }

        return $this;
    }
5932
private function serviceExtensionMap(array $providers): array
    {
        $wrap = function ($factory) { return [$factory]; };

        return array_reduce($providers, function ($extensions, ServiceProviderInterface $provider) use ($wrap) {

            return array_merge_recursive($extensions, array_map($wrap, $provider->getExtensions()));

        }, []);
    }
901365
private function getOperatorConfiguration(array $operators): array
    {
        $conf = [];
        foreach ($operators as $operator => $leafType) {
            $instance = $this->types->getOperator($operator, $leafType);
            $field = [
                'name' => $this->getOperatorFieldName($operator),
                'type' => $instance,
            ];

            $conf[] = $field;
        }

        return $conf;
    }
1271528
private function findPropertyInjections(array $injections)
    {
        $ret = [];
        if (is_array($injections)) {
            foreach ($injections as $injection) {
                if (!isset($injection['property'])){
                    continue;
                }
                $ret[] = $injection;
            }
        }
        return $ret;
    }
879337
protected function normalizeAsArray($objects) : array
    {
        $key = $this->relation;

        if (!is_array($objects) && !$objects instanceof Collection) {
            throw new MappingException("column '$key' should be of type array or collection");
        }

        if ($objects instanceof Collection) {
            $objects = $objects->all();
        }

        $normalizedObjects = [];

        foreach ($objects as $object) {
            $wrapper = $this->factory->make($object);
            $normalizedObjects[] = $wrapper->getEntityAttributes();
        }

        if ($this->asJson) {
            $normalizedObjects = json_encode($normalizedObjects);
        }

        return [$key => $normalizedObjects];
    }
203930
public function whereKeys(array $values)
    {
        $repo = $this->getRepo();

        $this->select->whereIn("{$repo->getTable()}.{$repo->getPrimaryKey()}", $values);

        return $this;
    }