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);
        }
    }