Get results

@return array|static[]
342642
public function results()
    {

        if ($this->classname) {
            $orderAdapter = app(\Antares\Datatables\Adapter\OrderAdapter::class);
            $orderAdapter->setClassname($this->classname);
            $orderAdapter->setEngineInstance($this);

            $groupsFilterAdapter = app(\Antares\Datatables\Adapter\GroupsFilterAdapter::class);
            $groupsFilterAdapter->setClassname($this->classname);
            $groupsFilterAdapter->setEngineInstance($this);
        }
        return $this->query->get();
    }
1373835
public function getResults()
    {
        return $this->hasResults() ? $this->adapter->getResults($this->getOffset(), $this->limit) : [];
    }
148656
public function get(): array
    {
        /**
         * @var $queryObject   \Pecee\Pixie\QueryBuilder\QueryObject
         * @var $executionTime float
         * @var $start         float
         * @var $result        array
         */

        $queryObject = $this->getQuery();
        $this->connection->setLastQuery($queryObject);

        $this->fireEvents(EventHandler::EVENT_BEFORE_SELECT, $queryObject);

        $executionTime = 0;
        $startTime = microtime(true);

        if ($this->pdoStatement === null) {

            [$this->pdoStatement, $executionTime] = $this->statement(
                $queryObject->getSql(),
                $queryObject->getBindings()
            );
        }

        $result = \call_user_func_array([$this->pdoStatement, 'fetchAll'], $this->fetchParameters);
        $this->pdoStatement = null;

        $executionTime += microtime(true) - $startTime;

        $this->fireEvents(EventHandler::EVENT_AFTER_SELECT, $queryObject, [
            'execution_time' => $executionTime,
        ]);

        return $result;
    }
509025
final public static function all() : array
    {
        static $all = null;

        if ($all === null) {
            foreach ((new \ReflectionClass(get_called_class()))->getConstants() as $constant) {
                $all[] = new static($constant);
            }
        }

        return $all;
    }
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;
    }
33930
public function getResults()
	{
		if (!isset($this->resultset))
		{
			$this->run();
		}

		$documents = array();
		foreach ($this->resultset as $document)
		{
			array_push($documents, $document);
		}

		foreach ($documents as &$document)
		{
			$document = $document->getFields();
		}

		return $documents;
	}
1101962
public function getResultContext(): ?array
    {
        $context = $this->getConfiguration()->getOption('result_context');
        if ($context) {
            $context = array_merge($this->getFamily()->getContext(), (array) $context);
        }

        return $context;
    }
257431
public function all()
    {
        $results = [];
        foreach ($this->index->getKeys() as $key) {
            $result = $this->get($key);
            $results[key($result)] = current($result);
        }

        return $results;
    }
1138428
private function all(): array
    {
        $fields = static::$_fields;

        $data = [];
        foreach ($fields as $f) {
            if (isset($this->$f) and !is_null($this->$f)) {
                $data[$f] = $this->$f;
            }
        }

        return $data;
    }
742998
public function getExecTasks(): array
    {
        $data = [];
        $runTimeTableTasks = $this->getRunTimeTable()->table;
        if (\count($runTimeTableTasks) <= 0) {
            return $data;
        }

        $min = date('YmdHi');

        foreach ($runTimeTableTasks as $key => $value) {
            if ($value['minute'] == $min) {
                if (time() == $value['sec'] && $value['runStatus'] == self::NORMAL) {
                    $data[] = [
                        'key'        => $key,
                        'taskClass'  => $value['taskClass'],
                        'taskMethod' => $value['taskMethod'],
                    ];
                }
            }
        }

        foreach ($data as $item) {
            $this->startTask($item['key']);
        }

        return $data;
    }
995000
public function getSearchResults()
    {
        // fetch the search results
        $limit = $this->db->getLimit();
        $rows = $this->db->getSearchResults();

        // TODO: Check how Sphinx handles this, seems to return full result set
        if (count($rows) > $limit[1]) {
            $rows = array_slice($rows, $limit[0], $limit[1]);
        }

        // set number of results
        $this->numberOfResults = $this->db->getAmountOfSearchResults();

        // count search phrase in ke_search statistic tables
        if ($this->conf['countSearchPhrases']) {
            $this->countSearchPhrase($this->sword, $this->swords, $this->numberOfResults, $this->tagsAgainst);
        }

        // render "no results" text and stop here
        if ($this->numberOfResults == 0) {
            $this->setNoResultsText();
        }

        // set switch for too short words
        $this->fluidTemplateVariables['wordsTooShort'] = $this->hasTooShortWords ? 1 : 0;

        // init counter and loop through the search results
        $resultCount = 1;
        $this->searchResult = GeneralUtility::makeInstance(Searchresult::class, $this);

        $this->fluidTemplateVariables['resultrows'] = array();
        if (is_array($rows)) {
            foreach ($rows as $row) {
                $this->searchResult->setRow($row);

                $tempMarkerArray = array(
                    'orig_uid' => $row['orig_uid'],
                    'orig_pid' => $row['orig_pid'],
                    'title_text' => $row['title'],
                    'content_text' => $row['content'],
                    'title' => $this->searchResult->getTitle(),
                    'teaser' => $this->searchResult->getTeaser(),
                );

                // hook for additional markers in result row
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['additionalResultMarker'])) {
                    // make curent row number available to hook
                    $this->currentRowNumber = $resultCount;
                    foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['additionalResultMarker'] as $_classRef) {
                        $_procObj = &GeneralUtility::makeInstance($_classRef);
                        $_procObj->additionalResultMarker($tempMarkerArray, $row, $this);
                    }
                    unset($this->currentRowNumber);
                }

                // add type marker
                // for file results just use the "file" type, not the file extension (eg. "file:pdf")
                list($type) = explode(':', $row['type']);
                $tempMarkerArray['type'] = str_replace(' ', '_', $type);

                // use the markers array as a base for the fluid template values
                $resultrowTemplateValues = $tempMarkerArray;

                // set result url
                $resultUrl = $this->searchResult->getResultUrl($this->conf['renderResultUrlAsLink']);
                $resultrowTemplateValues['url'] = $resultUrl;

                // set result numeration
                $resultNumber = $resultCount
                    + ($this->piVars['page'] * $this->conf['resultsPerPage'])
                    - $this->conf['resultsPerPage'];
                $resultrowTemplateValues['number'] = $resultNumber;

                // set date (formatted and raw as a timestamp)
                $resultDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $row['sortdate']);
                $resultrowTemplateValues['date'] = $resultDate;
                $resultrowTemplateValues['date_timestamp'] = $row['sortdate'];

                // show tags?
                $tags = $row['tags'];
                $tags = str_replace('#', ' ', $tags);
                $resultrowTemplateValues['tags'] = $tags;

                // set preview image and/or type icons
                // for files we have the corresponding entry in sys_file as "orig_uid" available (not sys_file_reference)
                // for pages and news we have to fetch the file reference uid
                if ($type == 'file') {
                    $resultrowTemplateValues['filePreviewId'] = $row['orig_uid'];
                    $resultrowTemplateValues['treatIdAsReference'] = 0;
                } else {
                    $resultrowTemplateValues['filePreviewId'] = $this->getFileReference($row);
                    $resultrowTemplateValues['treatIdAsReference'] = 1;
                }

                // get the icon for the current record type
                $resultrowTemplateValues['typeIconPath'] = $this->getTypeIconPath($row['type']);

                // set end date for cal events
                if ($type == 'cal') {
                    $resultrowTemplateValues['cal'] = $this->getCalEventEnddate($row['orig_uid']);
                }

                // add result row to the variables array
                $this->fluidTemplateVariables['resultrows'][] = $resultrowTemplateValues;

                // increase result counter
                $resultCount++;
            }
        }
    }
1258014
public function getResultIDs()
    {
        $results = $this->executeGetResults();
        $ids = [];
        foreach ($results as $result) {
            $ids[] = $result['uID'];
        }

        return $ids;
    }
1311621
public function getResults()
    {
        if ($this->_children === null) {
            $this->_children = $this->getFreshResults();
        }
        return $this->_children;
    }
642698
public function getValues(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $value) {
            $result[$key] = $this->$key;
        }

        return $result;
    }
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;
	}
81959
public static function getResults()
		{
			/**
			 * ['title']
			 * ['state']    = OK, WARNING, ERROR
			 * ['hint']
			 */
			$checks = [];

			// Checks PHP Version
			$title = 'PHP - Version - ' . PHP_VERSION;

			# && version_compare(PHP_VERSION, '5.9.0', '<')
			if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} elseif (version_compare(PHP_VERSION, '5.3.0', '<=')) {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Minimum 5.4'
				];
			}

			// PDO extension
			$title = 'PDO extension';
			if (extension_loaded('pdo')) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Install PDO Extension'
				];
			}

			// PDO MySQL extension
			$title = 'PDO MySQL extension';
			if (extension_loaded('pdo_mysql')) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Required by database'
				];
			}

			// Checks GD Extension
			$title = 'PHP - GD Extension';
			if (function_exists('gd_info')) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Install GD Extension'
				];
			}

			// PHP SMTP
			$title = 'PHP Mail SMTP';
			if (strlen(ini_get('SMTP')) > 0) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'WARNING',
					'hint'  => 'SMTP is required to send mails'
				];
			}

			// Checks Writable Config
			$title      = 'Permissions - Config';
			$configFile = dirname(Yii::$app->params['dynamicConfigFile']);
			if (is_writeable($configFile)) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Make ' . $configFile . " writable"
				];
			}

			// Check Runtime Directory
			$title = 'Permissions - Runtime';
			if (is_writable(Yii::$app->runtimePath)) {
				$checks[] = [
					'title' => $title,
					'state' => 'OK'
				];
			} else {
				$checks[] = [
					'title' => $title,
					'state' => 'ERROR',
					'hint'  => 'Make ' . Yii::$app->runtimePath . ' writable'
				];
			}

			// Only for Windows
			if (strpos(strtolower(php_uname('s')), 'windows') !== FALSE) {
				// Check COM support
				$title = 'PHP COM Support';
				if (extension_loaded('com_dotnet')) {
					$checks[] = [
						'title' => $title,
						'state' => 'OK'
					];
				} else {
					$checks[] = [
						'title' => $title,
						'state' => 'ERROR',
						'hint'  => 'Install COM extension - ' . Html::a('COM Support', 'http://php.net/manual/en/book.com
					.php', ['target' => 'blank'])
					];
				}
			}

			return $checks;
		}
615149
public function get_static_data() {
        // Delegates all processing to the analysis.
        $result = new \core_analytics\local\analysis\result_array($this->get_modelid(), false, $this->get_options());
        $analysis = new \core_analytics\analysis($this, false, $result);
        $analysis->run();
        return $result->get();
    }