Returns element's name.

@param int|null|string $index current row index
@param bool $withPrefix whether to add prefix.

@return string
332892
public function getElementName($index, $withPrefix = true)
    {
        if ($index === null) {
            $index = '{' . $this->renderer->getIndexPlaceholder() . '}';
        }

        $elementName = $this->isRendererHasOneColumn()
            ? '[' . $this->name . '][' . $index . ']'
            : '[' . $index . '][' . $this->name . ']';

        if (!$withPrefix) {
            return $elementName;
        }

        $prefix = $this->getInputNamePrefix();
        if ($this->context->isEmbedded && strpos($prefix, $this->context->name) === false) {
            $prefix = $this->context->name;
        }

        return $prefix . $elementName . (empty($this->nameSuffix) ? '' : ('_' . $this->nameSuffix));
    }
303173
public function get_row_attribs($index = null)
    {
        if ($index === null) {
            $index = $this->rowindex;
        }

        return $this->rows[$index] ? $this->rows[$index]->attrib : null;
    }
1314725
private function parseIndex( SimpleXMLElement $index )
    {
        $indexFields = array();

        foreach ( $index->field as $indexField )
        {
            $indexFieldName = (string) $indexField->name;

            $indexFields[$indexFieldName] = ezcDbSchema::createNewIndexField(
                isset( $indexField->sorting ) ? (string) $indexField->sorting : null
            );
        }

        return ezcDbSchema::createNewIndex(
            $indexFields,
            isset( $index->primary ) ? (string) $index->primary : false,
            isset( $index->unique ) ? (string) $index->unique : false
        );
    }
1064098
public function getTable($withPrefix = true)
    {
        if (is_null($this->table)) {
            $classBasename = (new \ReflectionClass($this))->getShortName();
            $this->setTable(strtolower($classBasename));
        }

        if ($withPrefix) {
            return $this->getPrefix() . $this->table;
        }

        return $this->table;
    }
667225
public function withNamePrefixedBy(string $prefix) : Index
    {
        if ($prefix === '') {
            return $this;
        }

        return new Index(
                $prefix . $this->name,
                $this->isUnique,
                $this->columnNames
        );
    }
241434
@Override
    public String wordAtIndex(int index) {
        T element = idxMap.get(index);
        if (element != null) {
            return element.getLabel();
        }
        return null;
    }
1254068
public function get_element($idx)
    {
        switch ($idx) {
            case 'FIRST': return $this->index[0];
            case 'LAST':  return end($this->index);
            default:      return $this->index[$idx];
        }
    }
665079
public function get_display_name($item, $withpostfix = true) {
        return format_text($item->name, FORMAT_HTML, array('noclean' => true, 'para' => false)) .
                ($withpostfix ? $this->get_display_name_postfix($item) : '');
    }
1127335
public function label(int $index)
    {
        if (!isset($this->labels[$index])) {
            throw new InvalidArgumentException("Row at offset $index"
                . ' does not exist.');
        }

        return $this->labels[$index];
    }
241679
private function getByIndex($index)
    {
        if (!isset($this->headers[$index])) {
            return null;
        }
        if ($this->headerObjects[$index] === null) {
            $this->headerObjects[$index] = $this->headerFactory->newInstance(
                $this->headers[$index][0],
                $this->headers[$index][1]
            );
        }
        return $this->headerObjects[$index];
    }
641849
function getElementName($index)
    {
        $this->_createElementsIfNotExist();
        $elementName = false;
        if (is_int($index) && isset($this->_elements[$index])) {
            $elementName = $this->_elements[$index]->getName();
            if (isset($elementName) && $elementName == '') {
                $elementName = $index;
            }
            if ($this->_appendName) {
                if (is_null($elementName)) {
                    $elementName = $this->getName();
                } else {
                    $elementName = $this->getName().'['.$elementName.']';
                }
            }

        } elseif (is_string($index)) {
            foreach (array_keys($this->_elements) as $key) {
                $elementName = $this->_elements[$key]->getName();
                if ($index == $elementName) {
                    if ($this->_appendName) {
                        $elementName = $this->getName().'['.$elementName.']';
                    }
                    break;
                } elseif ($this->_appendName && $this->getName().'['.$elementName.']' == $index) {
                    break;
                }
            }
        }
        return $elementName;
    }
1036079
public function withIndex(string $index): self
    {
        $metadata = clone $this;
        $metadata->index = $index;

        return $metadata;
    }
198886
public function getName($extension = self::WITH_EXTENSION) {
    if (isset($this->extension) && $extension == self::WITH_EXTENSION)
      return $this->name.'.'.$this->extension;
    else
      return $this->name;
  }
160927
protected function parseForce($index) {
        if(empty($index)) return '';
        if(is_array($index)) $index = join(",", $index);
        return sprintf(" FORCE INDEX ( %s ) ", $index);
    }
180273
protected function getLoadValueFromIndex($index)
    {
        $loadValue = $this->getLoadValue();
        if (!is_array($loadValue)) {
            $loadValue = [];
        }

        return array_get($loadValue, $index, []);
    }
1048078
public function getOptionNames($sPrefix)
    {
        $sPrefix = trim((string)$sPrefix);
        $sPrefix = rtrim($sPrefix, '.') . '.';
        $sPrefixLen = strlen($sPrefix);
        $aOptions = [];
        foreach($this->aOptions as $sName => $xValue)
        {
            if(substr($sName, 0, $sPrefixLen) == $sPrefix)
            {
                $iNextDotPos = strpos($sName, '.', $sPrefixLen);
                $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) :
                    substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen);
                $aOptions[$sOptionName] = $sPrefix . $sOptionName;
            }
        }
        return $aOptions;
    }
31895
public function Item( $index )
	{
		if ( $this->getCount() <= $index && ! $this->_done )
		{
			$count = $this->getCount();
			while ( ! $this->_done && ( $count <= $index))
			{
				if ( $this->_iter->MoveNext() )
				{
					/**
					 * @var XmlNode $node
					 */
					$node = $this->GetNode( $this->_iter->getCurrent() );
					if ( ! is_null( $node ) )
					{
						$this->_list[] = $node;
						$count++;
					}
				}
				else
					$this->_done = true;
			}
		}
		if ( $index >= 0 && count( $this->_list ) > $index )
			return $this->_list[ $index ];
		return null;
	}