Process the results of a column listing query.

@param  array  $results
@return array
518390
public function processColumnListing($results)
	{
		$mapping = function ($r) {
			$r = (object) $r;

			return $r->name;
		};

		return array_map($mapping, $results);
	}
1076486
protected function buildUnkeyedResultSet(array $results) : array
    {
        $builder = new EntityBuilder($this->mapper, array_keys($this->eagerLoads), $this->useCache);

        return array_map(function ($item) use ($builder) {
            return $builder->build($item);
        }, $results);
    }
461813
public static function parseRelationShips(string $relationships, &$results): array
    {
        $relationships = explode(',', $relationships);

        $newResults = [];

        //if its a list
        if ($results instanceof ResultsetInterface && count($results) >= 1) {
            foreach ($results as $key => $result) {
                //clean records conver to array
            $newResults[$key] = $result->toArray();
                foreach ($relationships as $relationship) {
                    if ($results[$key]->$relationship) {
                        $newResults[$key][$relationship] = $results[$key]->$relationship;
                    }
                }
            }
        } else {
            //if its only 1 record
            if ($results instanceof Model) {
                $newResults = $results->toArray();
                foreach ($relationships as $relationship) {
                    if ($results->$relationship) {
                        $newResults[$relationship] = $results->$relationship;
                    }
                }
            }
        }

        unset($results);
        return $newResults;
    }
1370920
public function add(array $results)
    {
        $cachedResults = [];

        $keyColumn = $this->entityMap->getKeyName();

        foreach ($results as $result) {
            $id = $result[$keyColumn];

            // Forget the ID field from the cache attributes
            // to prevent any side effect.
            // TODO : remove primary key check from dirty attributes parsing
            //unset($result[$keyColumn]);
            $cachedResults[$id] = $this->rawResult($result);
        }

        if (empty($this->cache)) {
            $this->cache = $cachedResults;
        } else {
            $this->mergeCacheResults($cachedResults);
        }
    }
640823
private function processResults($results)
        {
            if (!empty($results->errors))
            {
                throw new ErrorFetchingTwitter();
            }

            $response = [];

            foreach ($results->statuses as $tweet)
            {
                $response[] = $tweet->text;
            }

            return $response;
        }
618661
protected function column($results)
    {
        $array = array();
        if ($results instanceof mysqli_result) {
            while ($row = $results->fetch_array()) {
                $array[] = $row[0];
            }
        } else {
            foreach ($results as $row) {
                $array[] = $row[0];
            }
        }
        return $array;
    }
755016
protected function success($results = null)
    {
        $this->trigger('json-success', $this, $results);
        $this->trigger('response-success', $this, $results);

        $json = array('error' => false);

        if($results) {
            $json['results'] = $results;
        }

        $body = json_encode($json, JSON_PRETTY_PRINT);

        $this->response
            ->set('headers', 'Content-Type', 'text/json')
            ->set('body', $body);

        return $body;
    }
37852
protected function parseResult($result) {
 
        if (! property_exists($result, 'return')) {
            return [];
        }

        $result = $result->return;
        
        if (is_null($result)) {
            return [];
        }
        
        if (!is_array($result)) {
            $result = [$result];
        }

        return $this->filterResult($result);
    }
120962
public function processColumnListing($results)
    {
        return array_values(array_map(function ($result)
        {
            $result = (object) $result;

            return $result->name;

        }, $results));
    }
1018881
public function process(array $values)
    {
        $results = [];

        foreach ($values as $value) {
            $results = array_merge($results,
                $this->getSolrRootlineForCategoryId($value));
        }

        return $results;
    }
751893
public static function parseRelationShips(string $relationships, &$results) : array
    {
        $relationships = explode(',', $relationships);

        $newResults = [];

        if (!($results instanceof Model)) {
            throw new Exception(_('Result needs to be a Baka Model'));
        }

        $newResults = $results->toFullArray();
        foreach ($relationships as $relationship) {
            if ($results->$relationship) {
                $newResults[$relationship] = $results->$relationship;
            }
        }

        unset($results);
        return $newResults;
    }
884330
protected function cacheResults(array $results)
    {
        $mapper = $this->mapper;

        // When hydrating EmbeddedValue object, they'll likely won't
        // have a primary key set.
        if ($mapper->getEntityMap()->getKeyName() !== null) {
            $mapper->getEntityCache()->add($results);
        }
    }
643089
protected function processResults($results, $object = false)
    {
        $processor = new DataProcessor(
            $results,
            $this->getColumnsDefinition(),
            $this->templates,
            $this->request->input('start')
        );

        return $processor->process($object);
    }
659816
private List<String> getColumnResults(int columnIndex,
			UserCoreResult<?, ?, ?> results) {

		List<String> values = new ArrayList<>();
		while (results.moveToNext()) {
			values.add(results.getString(columnIndex));
		}

		return values;
	}
495422
public function mapFromResults(array $arr_results)
    {
        $arr_entities = [];
        foreach ($arr_results as $obj_result) {
            $arr_entities[] = $this->mapOneFromResult($obj_result);
        }
        return $arr_entities;
    }
111564
protected function buildDictionary(array $results)
    {
        // First we will build a dictionary of child models keyed by the foreign key
        // of the relation so that we will easily and quickly match them to their
        // parents without having a possibly slow inner loops for every models.
        $dictionary = [];

        foreach ($results as $result) {
            $dictionary[$result->pivot->{$this->foreignKey}][] = $result;
        }

        return $dictionary;
    }
654860
public function addData(array $result): array
    {
        if ($result['tableName'] === 'sys_redirect' && isset($result['processedTca']['columns']['source_host'])) {
            $domains = $this->getHosts();
            foreach ($domains as $domain) {
                $result['processedTca']['columns']['source_host']['config']['valuePicker']['items'][] =
                    [
                        $domain,
                        $domain,
                    ];
            }
        }
        return $result;
    }