Resolve array data as providers

@param array $data
@access static
@return array
516589
public static function arrayResolve(array $data)
    {

        $array = [];

        foreach ($data as $provider => $bool) {

            if ($bool === true) {

                $array['required'][] = $provider;

            }
            else {

                $array['hidden'][] = $provider;

            }
        }

        return $array;
    }
403749
protected function parseRelationships(array $data)
    {
        $result = [];
        foreach ($data as $name => $relationshipData) {
            $dataSegment  = $relationshipData !== null ?
                $this->getArrayValue($relationshipData, DocumentInterface::KEYWORD_DATA, null) : null;

            if ($dataSegment === null || (empty($dataSegment) === true && is_array($dataSegment) === true)) {
                $result[$name] = new RelationshipsObject($dataSegment);
                continue;
            }

            if (is_array($dataSegment) === false) {
                $this->errors->addRelationshipError($name, 'Invalid element.');
                continue;
            }

            if ($this->isProbablySingleIdentity($dataSegment) === true) {
                $parsed = $this->parseSingleIdentityInRelationship($name, $dataSegment);
            } else {
                $parsed = $this->parseArrayOfIdentitiesInRelationship($name, $dataSegment);
            }

            if ($parsed !== null) {
                $result[$name] = new RelationshipsObject($parsed);
            }
        }

        return $result;
    }
651790
private function buildData(array $data): array
    {
        $default = [
            'url' => null,
            'lastmod' => 'now',
            'changefreq' => 'weekly',
            'priority' => 0.5,
            'type' => 'default',
        ];

        $data = array_merge($default, $data);

        $this->fixDataType($data);

        return $data;
    }
1036201
private function cleanData(array $data) : array
  {
    foreach($data as $key => $value) {
      $data[$key] = $this->replace($key, $value);
    }

    return $data;
  }
140702
public function getIdentifyingValues(array $data)
    {
        $keys = array();

        foreach ($this->getIdentifyingProperties() as $key) {
            if ($key->isMaterializable($data)) {
                $keys[$key->getName()] = $key->materialize($data, null);
            }
        }

        return $keys;
    }
331915
protected function scopedData($data, /*# string */ $scope)/*# : array */
    {
        if (is_array($data) && isset($data['class'])) {
            $data['scope'] = $scope;
        } else {
            $data = ['class' => $data, 'scope' => $scope];
        }
        return $data;
    }
261923
private function asData(array $data)
    {
        foreach ($data as $key => $value) {
            if ($value instanceof RawSqlFragmentInterface) {
                $data[$key] = $value->getFragment();
            } elseif ($value instanceof RawBindingInterface) {
                $data[$key] = $value->getTarget();
            } else {
                $placeholder = $this->getUniqPlaceholder();

                $data[$key] = $placeholder;
                $this->bind($placeholder, $value);
            }
        }

        return $data;
    }
191288
private function itemsFromArray(array $data): array
    {
        $objects = [];
        foreach ($data[$this->key()] as $objectData) {
            $objects[] = $this->item->from($objectData);
        }
        return $objects;
    }
238174
protected function _cleanupData(array $data = array())
    {
        $clean = array();

        foreach ($data as $key => $value)
        {
            if (!empty($value)) {
                $clean[$key] = $value;
            }
        }

        return $clean;
    }
841054
public function solveResolutions(array $data)
    {
        return null !== $this->resolutionManager
            ? $this->resolutionManager->solveResolutions($data)
            : $data;
    }
82624
public function provide($data = null, array $options = [])
    {
        $result = [];

        $combinedFields = $this->config->getProvider('combinedFields');
        $combinedFields = new $combinedFields($this->config);
        $combinedFields = $combinedFields->provide($data, $options);

        $view = $this->config->getView();
        foreach ($combinedFields as $suffix => $fieldOptions) {
            $fieldName = $this->config->getField() . '_' . $suffix;

            $config = new $fieldOptions['config']($fieldName, $this->config->getTable());

            $provider = $config->getProvider('renderName');
            $provider = new $provider($config);
            $options['label'] = $provider->provide();

            $provider = $config->getProvider('searchOptions');
            $provider = new $provider($config);

            $type = Inflector::underscore(str_replace('Config', '', (new \ReflectionClass($config))->getShortName()));
            $options['fieldDefinitions']->setName($fieldName);
            $options['fieldDefinitions']->setType($type);

            $result = array_merge($result, (array)$provider->provide($data, $options));
        }

        return $result;
    }
1025124
public static function fromData(array $data)
    {
        $group = new static(array_map(function ($data) {
            return $data['class']::fromData($data['params']);
        }, $data['constraints']));

        return $group->logicalOperator($data['logicalOperator']);
    }
714763
public function cleanArray(array $data)
    {
        $cleanedArray = [];

        foreach ($data as $key => $value) {
            $cleanedArray[$key] = \is_array($value)
                ? $this->cleanArray($value)
                : $this->getSafeArray($key, $data);
        }

        return $cleanedArray;
    }
1059212
private function _merge(array $data) : array
    {
        $values = $this->getValues();
        $values = array_merge($values, $data);
        return $values;
    }
560285
public static function fromData(array $data)
    {
        $policies = [];
        foreach (isset($data['schedule']) ? $data['schedule'] : [] as $policyData) {
            $policies[] = new Policy($policyData['interval'], $policyData['count']);
        }

        return new static($policies, isset($data['manual_count']) ? $data['manual_count'] : 1);
    }
166953
public function decode($data): array
    {
        $result = RequestContext::getServerBean($this->formatHandlerClass)->decode($data);
        if(!is_array($result))
        {
            $result = [];
        }
        return $result;
    }
120393
public function link_provider(array $data)
	{
		// do some validation
		if ( ! is_numeric($data['expires']))
		{
			if ($date = \DateTime::createFromFormat(\DateTime::ISO8601, $data['expires']))
			{
				$data['expires'] = $date->getTimestamp();
			}
			elseif ($date = \DateTime::createFromFormat('Y-m-d H:i:s', $data['expires']))
			{
				$data['expires'] = $date->getTimestamp();
			}
			else
			{
				$data['expires'] = time();
			}
		}

		// get rid of old registrations to prevent duplicates
		\DB::delete($this->config['table'])->where('uid', '=', $data['uid'])->where('provider', '=', $data['provider'])->execute(static::$db_connection);

		// insert the new provider UID
		list($insert_id, $rows_affected) = \DB::insert($this->config['table'])->set($data)->execute(static::$db_connection);
		return $rows_affected ? $insert_id : false;
	}