public function setIndex($index)
    {
        if (is_int($index) === true || Format::isVariableRef($index) === true) {
            $this->index = $index;
        } else {
            $msg = "The 'index' argument must be an integer or a variable reference, '" . $index . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setIndex($index)
    {
        if (is_int($index) === true || Format::isVariableRef($index) === true) {
            $this->index = $index;
        } else {
            $msg = "The 'index' argument must be an integer or a variable reference, '" . $index . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setIndex ( $ index ) { if ( is_int ( $ index ) === true || Format :: isVariableRef ( $ index ) === true ) { $ this -> index = $ index ; } else { $ msg = "The 'index' argument must be an integer or a variable reference, '" . $ index . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the index to use when displaying a variable of ordered cardinality. Give a negative integer
if there is no index indicated.

@param integer|string $index An integer or variable reference.
@throws \InvalidArgumentException If $index is not an integer nor a variable reference.
Set the index to use when displaying a variable of ordered cardinality . Give a negative integer if there is no index indicated .