Loads the result.

@return array
422909
protected function getResultOnce()
    {
        if ($this->result !== null) {
            return $this->result;
        }

        $this->result = $this->randomCombinations ? $this->getRandomizedResult()
                                            : $this->getFromProvider($this->limit);

        return $this->result;
    }
962490
public function all(): array
    {
        $results = [];
        \array_walk_recursive($this->results, function ($v) use (&$results) {
            $results[] = $v;
        });

        return $results;
    }
383464
private function _getResultData()
    {
        $def = $this->actionChain->getCurrentAction();
        $result = $def['result'];
        if (is_string($result)) {
            return $this->getAttribute($result);
        } elseif (is_array($result)) {
            return array_pop($result);
        } else {
            return null;
        }
    }
164428
protected function load()
    {
        $data = array();

        /** @var LoaderInterface $loader */
        foreach ($this->loaders as $loader) {
            try {
                $data = array_merge($data, $loader->load());

                if ($loader->stopPropagation()) {
                    break;
                }
            } catch (LoaderException $e) {
                $this->getLogger()->error($e->getMessage());
            }
        }

        return $data;
    }
1006169
public function getResult()

    {
        $bodyParams = $this->attributes;


        $response = $this->_connection->post(
            Urls::URL_TRAVERSAL,
            $this->getConnection()->json_encode_wrapper($bodyParams)
        );

        return $response->getJson();
    }
1091154
public function fetchAll() {
    $results = array();
    $result = $this->next();
    while($result !== null) {
      $results = array_merge($results,$result);
      $result = $this->next();
    }
    return $results;
  }
1300966
public function getResults(){
        $results = $this->get();
        if(!$results)
            return [];
        foreach($results as $index => $resultData){
            $return[$index]['location'] = implode(',',$resultData['geometry']['location']);
            $return[$index]['name'] = $resultData['name'];
            $return[$index]['vicinity'] = $resultData['vicinity'];
        }
        return $return;
    }
739509
public function load()
    {
        $data = [];
        $routes = $this->getRoutes();
        foreach($routes as $route) {
            $parsedRoute = $this->parseRoute($route);
            $routeData = $this->requestService($route, $parsedRoute);

            if ($routeData !== null) {
                // When the routeData contains more entry. (if it's a numeric array)
                if (array_values($routeData) === $routeData) {
                    $data = array_merge($data, $routeData);
                }
                else {
                    $data[] = $routeData;
                }
            }
        }
        $this->returnData($data);
    }
549457
public function result()
    {
        $this->fill();
        return $this->results->isEmpty() ? null : $this->results->dequeue();
    }
1209621
public function toArray()
    {
        $result = [];
        foreach ($this->results as $r) {
            $result[] = $r->toArray();
        }
        return $result;
    }
795645
public function load_data() {
		$data = get_option( $this->store_key() );
		if ( empty( $data ) ) {
			$data = $this->get_data();
		}

		return $data;
	}
787542
private function loadFiles(): array
    {
        $items = [];
        if (!is_dir($this->path)) {
            return $items;
        }

        $entries = Finder::create()->files()->name('*.php')->in($this->path);

        // Load files.
        foreach ($entries as $entry) {
            $basename = call_user_func([$entry, 'getBasename']);

            if ($this->isEnvironmentFilename($basename)) {
                // Do not process this file. It will be handled later.
                continue;
            }

            $pathRelative = call_user_func([$entry, 'getRelativePath']);
            $configKey = rtrim($basename, '.php');

            // Load main config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey);

            // Load environment config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey, $this->environment);
        }

        return $items;
    }
1370103
public function toArray(): array
	{
		$results = [];

		foreach($this->items as $item)
		{
			$results[] = $item->toArray();
		}

		return $results;
	}
225471
public function loadResult()
	{
		$this->connect();

		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return null;
		}

		// Get the first row from the result set as an array.
		$row = $this->fetchArray($cursor);

		if ($row)
		{
			$ret = $row[0];
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		return $ret;
	}
88087
public function getResults()
    {
        if (null === $this->results) {
            $queryKey = method_exists($this->getQuery(), 'getQueryKey') ? $this->getQuery()->getQueryKey() : null;
            if ($queryKey) {
                $newQueryKey = sprintf('%s offset %s limit %s', $queryKey, $this->getQuery()->getOffset(), $this->getQuery()->getLimit());
                $this->getQuery()->setQueryKey($newQueryKey);
            }
            
            $this->results = $this->getQuery()
                ->find($this->con)
            ;
        }

        return $this->results;
    }
761319
public function apiResult() : array {
		$result = [
			'success' => false,
			'error' => [],
			'pk' => $this->pk,
			'values' => $this->values,
			'values_loaded' => $this->values_loaded,
			'new_serials' => $this->new_serials
		];
		if ($this->hasErrors()) {
			$message = [];
			// details
			$details = [];
			if (!empty($this->collection['details'])) {
				$this->disassembleCollectionObject($this->collection['details'], $details);
			}
			$ignore_fields = [];
			if ($this->collection_object->primary_model->tenant ?? false) {
				$ignore_fields[$this->collection_object->primary_model->tenant_column] = $this->collection_object->primary_model->tenant_column;
			}
			if ($this->collection_object->primary_model->module ?? false) {
				$ignore_fields[$this->collection_object->primary_model->tenant_column] = $this->collection_object->primary_model->tenant_column;
			}
			foreach ($details as $k3 => $v3) {
				foreach ($ignore_fields as $k4 => $v4) {
					if (isset($v3['map'][$k4])) {
						$ignore_fields[$v3['map'][$k4]] = $v3['map'][$k4];
					}
				}
			}
			$message[] = i18n(null, 'Record') . ':';
			$temp = [];
			foreach ($this->pk as $k => $v) {
				if (!empty($ignore_fields[$k])) continue;
				$temp[] = $k . ' = ' . $v;
			}
			$message[] = "\t" . i18n(null, 'Primary Key') . ': ' . implode(', ', $temp);
			// general errors
			if (!empty($this->errors['general']['danger'])) {
				$message[] = "\t" . i18n(null, 'General Errors') . ':';
				foreach ($this->errors['general']['danger'] as $v) {
					$message[] = "\t\t" . $v;
				}
			}
			// fields
			if (!empty($this->errors['flag_error_in_fields'])) {
				$message[] = "\t" . i18n(null, 'Field Errors') . ':';
				foreach ($this->errors['fields'] as $k => $v) {
					if (empty($v['danger'])) continue; // only errors
					// regular fields
					if (strpos($k, '[') === false) {
						$message[] = "\t\t" . $k . ': ';
						foreach ($v['danger'] as $v2) {
							$message[] = "\t\t\t" . $v2;
						}
					} else { // details
						$field = str_replace(']', '', $k);
						$parts = explode('[', $field);
						$message[] = "\t\t" . $details[$parts[0]]['name'] . ', ' . $parts[2] . ': ';
						// pk
						$pk_parts = explode('::', $parts[1]);
						$pk_details = [];
						foreach ($details[$parts[0]]['pk'] as $k2 => $v2) {
							$pk_details[$v2] = $pk_parts[$k2] ?? null;
						}
						$temp = [];
						foreach ($pk_details as $k2 => $v2) {
							if (!empty($ignore_fields[$k2])) continue;
							$temp[] = $k2 . ' = ' . $v2;
						}
						$message[] = "\t\t\t" . i18n(null, 'Primary Key') . ': ' . implode(', ', $temp);
						foreach ($v['danger'] as $v2) {
							$message[] = "\t\t\t" . $v2;
						}
						// todo handle subdetails
					}
				}
			}
			$result['error'][] = implode("\n", $message);
		} else {
			$result['success'] = true;
		}
		return $result;
	}
1044090
public function loadResult($params=array()) {
		
		$this->openConnection();
		
		$res = NULL;

		try {

			$stat = $this->handler->prepare($this->query);
			$stat->execute((array)$params);
			
			// logger
			$count = $this->handler->query('SELECT FOUND_ROWS()')->fetchColumn();
			$this->logParamQuery($this->query, $count, $params);
			$res = $stat->fetch(\PDO::FETCH_COLUMN);	
		
		} catch (\PDOException $e) {

			$this->handleException($e, $params);

		}
		
		$stat->closeCursor();

		return $res;
		
	}