Returns the group in the given index.
@param integer $index The index being requested.
@return Group
@throws \UndefinedOffsetException Thrown when the index requested does not exist.
978929
public function getGroup(int $index): Group
    {
        if ($index >= count($this->groups)) {
            throw new \UndefinedOffsetException();
        }
        return $this->groups[$index];
    }
1033117
public function getChildByIndex($index)
    {
        $index = intval($index);

        return ((null !== $this->children) && array_key_exists($index, $this->children)) ? $this->children[$index] : null;
    }
180873
public function withIndex(int $index): self
    {
        $state = clone $this;
        $state->_index = $index;
        return $state;
    }
252338
public function item($index)
    {
        if (!($this->_content instanceof ContentSet)) {
            throw new ClassContentException(
                sprintf('Can not get item of a content %s.', get_class($this)),
                ClassContentException::UNKNOWN_ERROR
            );
        }

        if (0 <= $index && $index < $this->count()) {
            return $this->getData($index);
        }

        return;
    }
374176
public function setIndex($index)
    {
        if ($index instanceof Index) {
            $index = $index->getName();
        }

        return $this->setParam('_index', $index);
    }
192771
public function get($index)
    {
        if (!$this->has($index)) {
            throw new Exception\UndefinedKeyException($index);
        }

        return $this->value[$index];
    }
97552
public function remove($index)
	{
		$value = $this->opt($index);
		unset($this->map[$index]);
		
		return $value;
	}
64002
public function get(int $index): ?int {
        if (isset($this->array[$index])) {
            return $this->array[$index];
        }
        return null;
    }
564266
public function index($index = null)
	{
		if (null === $index) {
			$index = Config::get('search.default_index', 'default');
		}
		
		if (!isset($this->indexes[$index])) {
			$this->indexes[$index] = Index::factory($index, $this->driver);
		}
		
		return $this->indexes[$index];
	}
892125
public function offsetUnset ($index)
	{
		$value = $this->offsetGet($index);

		if ($index == 0) {
			return array_shift($this->storage);
		}

		if ($index == $this->count() - 1) {
			return array_pop($this->storage);
		}

		$new = $this->slice(0, $index - 1);
		$new->push($this->slice($index, $this->count()));

		$this->storage = $new->to_array();

		return $value;
	}
868996
public function get($index)
    {
        if (!is_int($index) || $index < 0) {
            throw new \InvalidArgumentException('ItemList::get() expects a positive integer argument.');
        }

        return isset($this->list[$index]) ? $this->list[$index] : null;
    }
1124654
public function eq(int $index): ?\DOMNode {
        if ($index < 0) {
            $index = $this->collection()->count() + $index;
        }

        return $this->collection()->offsetGet($index);
    }
470493
public function offsetGet($index) {
		if( $this->results === null ){
			$this->results = ($this->query)();
		}
		if( isset($this->results[$index]) ){
			return $this->results[$index];
		}
		return null;
	}
275623
public function remove($index) {
        $element = $this->get($index);
        if (!is_null($element)) { array_splice($this->_elements, $index, 1); }
        return $element;
    }
901986
public function item($index)
    {
        if (null !== $this->getDraft()) {
            return $this->getDraft()->item($index);
        }

        if (0 <= $index && $index < $this->count()) {
            return $this->getData($index);
        }

        return;
    }
854755
public function offsetGet($index)
    {
        if (parent::offsetExists($index)) {
            return parent::offsetGet($index);
        }
        if (isset(self::$global[$index])) {
            return self::$global[$index];
        }

        return null;
    }
1008047
public function getByIndex($index)
    {
        if (isset($this->elements[$index])) {
            return $this->elements[$index];
        }

        return null;
    }