返回列表key中，下标为index的元素。
@param $index int 索引 0开始
@return string
180538
public function get(int $index): string
    {
        return $this->handle->lIndex($this->name, $index);
    }
275623
public function remove($index) {
        $element = $this->get($index);
        if (!is_null($element)) { array_splice($this->_elements, $index, 1); }
        return $element;
    }
891898
protected function getColumnNameByIndex($index)
    {
        $name = (isset($this->columns[$index]) && $this->columns[$index] != '*')
            ? $this->columns[$index] : $this->getPrimaryKeyName();

        return in_array($name, $this->extraColumns, true) ? $this->getPrimaryKeyName() : $name;
    }
566493
public function val($index = 0) {

		if(false === ('-' . intval($index) == '-' . $index)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($index)), E_USER_ERROR);
		}

		$val = $this -> strip();

		if(true === isset($val[$index])) {
			return $val[$index];
		}

		return null;
	}
287820
protected function createIndex($index) {
		if($index->isPrimary())
			$res = "\n\t\$table->setPrimaryKey(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		elseif($index->isUnique())
			$res = "\n\t\$table->addUniqueIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		else {
			if(count($index->getFlags()) > 0)
				$res = "\n\t\$table->addIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."',\n\t\t".$this->outputPHP($index->getFlags(), 2)."\n\t);";
			else
				$res = "\n\t\$table->addIndex(\n\t\t".$this->outputPHP($index->getColumns(), 2).",\n\t\t'".$index->getName()."'\n\t);";
		}
		
		return $res;
	}
1076872
public function sort($index)
    {
        $this->sort_order = $index->get_parameters('ORDER');

        if (empty($this->raw_data)) {
            return;
        }

        // when sorting search result it's good to make the index smaller
        if ($index->count() != $this->count_messages()) {
            $index->filter($this->get());
        }

        $result  = array_fill_keys($index->get(), null);
        $datalen = strlen($this->raw_data);
        $start   = 0;

        // Here we're parsing raw_data twice, we want only one big array
        // in memory at a time

        // Assign roots
        while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start))
            || ($start < $datalen && ($pos = $datalen))
        ) {
            $len   = $pos - $start;
            $elem  = substr($this->raw_data, $start, $len);
            $start = $pos + 1;

            $items = explode(self::SEPARATOR_ITEM, $elem);
            $root  = (int) array_shift($items);

            if ($root) {
                $result[$root] = $root;
                foreach ($items as $item) {
                    list($lv, $id) = explode(self::SEPARATOR_LEVEL, $item);
                    $result[$id] = $root;
                }
            }
        }

        // get only unique roots
        $result = array_filter($result); // make sure there are no nulls
        $result = array_unique($result);

        // Re-sort raw data
        $result = array_fill_keys($result, null);
        $start = 0;

        while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start))
            || ($start < $datalen && ($pos = $datalen))
        ) {
            $len   = $pos - $start;
            $elem  = substr($this->raw_data, $start, $len);
            $start = $pos + 1;

            $npos = strpos($elem, self::SEPARATOR_ITEM);
            $root = (int) ($npos ? substr($elem, 0, $npos) : $elem);

            $result[$root] = $elem;
        }

        $this->raw_data = implode(self::SEPARATOR_ELEMENT, $result);
    }
919849
protected function getSortingPart($index)
    {
        $sorting = $this->getSorting();
        if ($sorting === '') {
            return null;
        }

        $parts = explode(' ', $sorting);
        return isset($parts[$index]) ? $parts[$index] : null;
    }
1291659
public function GetX000($index)
	{
		if (array_key_exists($index, $this->words->x000))
		{
			return $this->words->x000;
		}
		else
		{
			throw new Exception('x000: Array index (' . $index . ') does not exist in JSON file.');
		}
	}
476104
public function get_element($index)
    {
        $count = $this->count();

        if (!$count) {
            return null;
        }

        // first element
        if ($index === 0 || $index === '0' || $index === 'FIRST') {
            $pos = strpos($this->raw_data, self::SEPARATOR_ELEMENT);
            if ($pos === false)
                $result = (int) $this->raw_data;
            else
                $result = (int) substr($this->raw_data, 0, $pos);

            return $result;
        }

        // last element
        if ($index === 'LAST' || $index == $count-1) {
            $pos = strrpos($this->raw_data, self::SEPARATOR_ELEMENT);
            if ($pos === false)
                $result = (int) $this->raw_data;
            else
                $result = (int) substr($this->raw_data, $pos);

            return $result;
        }

        // do we know the position of the element or the neighbour of it?
        if (!empty($this->meta['pos'])) {
            if (isset($this->meta['pos'][$index]))
                $pos = $this->meta['pos'][$index];
            else if (isset($this->meta['pos'][$index-1]))
                $pos = strpos($this->raw_data, self::SEPARATOR_ELEMENT,
                    $this->meta['pos'][$index-1] + 1);
            else if (isset($this->meta['pos'][$index+1]))
                $pos = strrpos($this->raw_data, self::SEPARATOR_ELEMENT,
                    $this->meta['pos'][$index+1] - $this->length() - 1);

            if (isset($pos) && preg_match('/([0-9]+)/', $this->raw_data, $m, null, $pos)) {
                return (int) $m[1];
            }
        }

        // Finally use less effective method
        $data = explode(self::SEPARATOR_ELEMENT, $this->raw_data);

        return $data[$index];
    }
300321
public function get($index): JWK
    {
        if (!$this->has($index)) {
            throw new InvalidArgumentException('Undefined index.');
        }

        return $this->keys[$index];
    }
439772
public function getRow($index)
    {
        $keys = array_keys($this->rows);

        return isset($keys[$index]) ? $this->rows[$keys[$index]] : null;
    }
1159828
public function get($index)
	{
		return array_slice($this->items, $index * $this->itemsPerPage, $this->itemsPerPage);
	}
176897
protected function getValue($index)
    {
        if ($this->values[$index] === null) {
            return null;
        }
        return $this->values[$index]->value;
    }
83196
public function getParamClean($index){
        if(isset($this->params[$index])){
            return $this->params[$index];
        }else{
            return NULL;
        }
    }
374176
public function setIndex($index)
    {
        if ($index instanceof Index) {
            $index = $index->getName();
        }

        return $this->setParam('_index', $index);
    }
720301
public function getParam($index){
        if(isset($this->params[$index])){
            return $this->params[$index];
        }else{
            return NULL;
        }
    }
483544
public function getNameByIndex($index)
    {
        return isset($this->names[$index]) ? $this->names[$index] : null;
    }