Retrieve a result at a specific index. If no result is found, a new,
blank result will be generated, stored at the index, and returned.

@param  integer $index
@return Result
481264
public static function getOrCreateResultAt($index = 0)
    {
        $results = static::getResultAt($index);

        if (is_null($results)) {
            $results = static::makeResult()->attachAtIndex($index);
        }

        return $results;
    }
36762
public function get($index)
    {
        if (\array_key_exists($index, $this->arrCollection)) {
            return $this->arrCollection[$index];
        }

        return null;
    }
1105235
public function item(int $index)
    {
        return $this->offsetExists($index) ? $this->offsetGet($index) : null;
    }
890809
public function getCapture($index)
    {
        if (isset($this->captures[$index])) {
            return $this->captures[$index];
        } else {
            return null;
        }
    }
1103906
protected function getMatch($index)
    {

        return isset($this->lastMatches[$index]) ? $this->lastMatches[$index] : null;
    }
1313973
public function createIndex($index = null)
    {
        if (!$this->elasticsearch->indices()->exists(['index' => $index['index']])) {
            return $this->elasticsearch->indices()->create($index);
        }
    }
696982
public function get($index = 0, $field = null) {
        if ($this->performed) {
            if (is_numeric($index)) {
                $index = intval($index);
            } else if (is_string($index)) {
                $field = $index;
                $index = 0;
            } else {
                return null;
            }
        } else {
            if (is_array($index)) {
                return $this->where($index);
            }

            if (is_numeric($index)) {
                $index = intval($index);
            } else if (is_string($index)) {
                $field = $index;
                $this->field($field);
                $index = 0;
                $this->limit(0, 1);
            } else {
                $index = 0;
            }
            $this->select();
        }
        if (isset ($this->resultSets [ $index ])) {
            $row = $this->resultSets [ $index ];
            if ($field != null && isset ($row [ $field ])) {
                return $row [ $field ];
            }
            if ($field == null) {
                return $row;
            }
        }

        return null;
    }
139968
public function getItem( $index )
    {
        $item = null;

        if ( isset( $this->attributes['items'][$index] ) )
            $item = $this->attributes['items'][$index];

        return $item;
    }
889559
public function offsetGet($index)
    {
        if (!parent::offsetExists($index)) {
            throw new PropertyNotFoundException($index, __CLASS__);
        }

        return parent::offsetGet($index);
    }
176897
protected function getValue($index)
    {
        if ($this->values[$index] === null) {
            return null;
        }
        return $this->values[$index]->value;
    }
104095
public static function getDeleted(Index $index)
    {
        $change = new IndexMigrationChange();

        $change->isDeleted = true;
        $change->index = $index;

        return $change;
    }
520287
public function select($index)
    {
        $response = $this->__call('select', [$index]);
        $this->database = (int) $index;

        return $response;
    }
481660
public function get(int $index)
    {
        $this->internalDataListUpdate();
        if (isset($this->internalDataListData[$index])) {
            return $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
        }
        return null;
    }
1239003
public function load($index)
    {
        // Minor optimization, avoid lookups for unknow indexes
        if (!$this->exists($index)) {
            return;
        }

        // Can be null if index does not exists
        if (array_key_exists($index, $this->indexDefinitionCache)) {
            return $this->indexDefinitionCache[$index];
        }

        $param = $this
            ->db
            ->query(
                "SELECT data FROM {ucms_search_index} WHERE index_key = :index",
                ['index' => $index]
            )
            ->fetchField()
        ;

        if ($param) {
          $param = unserialize($param);
        }

        return $this->indexDefinitionCache[$index] = $param;
    }
954543
public function read(string $index)
    {
        $this->withIndexFilter($index);

        $builder = $this->createIndexModelBuilder();
        $data    = $this->fetchResource($builder, $builder->getModelClass());

        return $data;
    }
57558
public function getRow($index)
    {
        return isset($this->rows[$index]) ? $this->rows[$index] : null;
    }
250744
public function getCell($index)
    {
        return isset($this->cells[$index]) ? $this->cells[$index] : null;
    }