Returns the current token value.

@param  integer     $index Token position, if none given, consider the current iteration position.
@return string|null
541860
protected function _getToken($index, $type)
    {
        if ($index === null) {
            $index = $this->_current;
        }
        return isset($this->_data[$index]) ? $this->_data[$index][$type] : null;
    }
1095237
public function getElement($index)
    {
        return (array_key_exists((int) $index, $this->elements) ? $this->elements[$index] : null);
    }
494195
public function getParamByIndex($index='')
		{
			if(!$index) return $this->_params['number'];
			
			return isset($this->_params['number'][$index]) ? (string) $this->_params['number'][$index] : null;
		}
239897
public function get($index)
    {
        $result = \array_slice($this->nodes, $index, 1); // note: index can be negative
        if (\count($result) > 0) {
            return $result[0];
        }

        return null; // return null if no result for key
    }
1281239
public static function getPathSegment(int $index = 0)
    {
        $pathComponents = self::getPathSegments();
        return ArrayUtils::getArrayValueForKeyOrDefault($pathComponents, $index, false);
    }
263223
protected function getLastTokenOfLine(array $tokens, int $index): int
    {
        $line = $tokens[$index]['line'];

        $currentIndex = $index;
        while ($tokens[$currentIndex + 1]['line'] === $line) {
            $currentIndex++;
        }

        return $currentIndex;
    }
919849
protected function getSortingPart($index)
    {
        $sorting = $this->getSorting();
        if ($sorting === '') {
            return null;
        }

        $parts = explode(' ', $sorting);
        return isset($parts[$index]) ? $parts[$index] : null;
    }
124751
public function get($index = 0)
        {
            if (is_integer($index)) {
                if ($index + 1 > $this->count()) {
                    return null;
                } else {
                    return Arrays::first(array_slice($this->_items, $index, 1));
                }
            } else {
                if ($this->has($index)) {
                    return $this->_items[$index];
                }
            }

            return null;
        }
791367
public function getId($offset = null)
    {
        if (null !== ($token = $this->getToken($offset))) {
            return $token[0];
        }

        return null;
    }
1352458
public function get($index){
		if(isset($this->map[ $index ])){
			return $this->map[ $index ];
		}
		return null;
	}
262759
public function offsetGet($index)
    {
        foreach ((array)$this as $i => $element) {
            $i = (string)$i;
            if (is_string($element)) {
                continue;
            }
            if ($element->getElement()->getValue() == $index) {
                return $element;
            }
        }
        return parent::offsetGet($index);
    }
449787
public function getCollection($index)
    {
        return array_key_exists($index, $this->collections)
            ? $this->collections[$index]
            : null;
    }
192771
public function get($index)
    {
        if (!$this->has($index)) {
            throw new Exception\UndefinedKeyException($index);
        }

        return $this->value[$index];
    }
269920
private function _get($index, $accept_reverse_index)
    {
        $values = $this->getValues();
        if ($accept_reverse_index){
            $index = $this->_rindex($index, $values);
        }
        return $values[$index] ?? null;
    }
822643
public function interpretAttribute($attribute, $index = null)
    {
        if ($index) {
            $availables = $this->getInterpretations();

            if (isset($availables[$index])) {
                return $availables[$index]->{$attribute};
            }
        }

        $current = $this->getCurrentInterpretation();

        if ($current) {
            return $current->{$attribute};
        }

        return null;
    }
604572
public static function getValueAtIndex($array, $index)
    {
        $value = null;

        if (abs((int) $index) == self::LAST_INDEX) {
            $index == self::LAST_INDEX ? end($array) : reset($array);
            $value = current($array);
        } elseif (isset($array[$index])) {
            $value = $array[$index];
        }

        return $value;
    }
196175
public function getResult($index = 0)
    {
        if($index == 0 && count($this->results) > 0)
            return current($this->results);

        return isset($this->results[$index]) ?
                    $this->results[$index]
                : null;
    }