public function setN($n)
    {
        if (is_int($n) || (gettype($n) === 'string' && Format::isVariableRef($n))) {
            $this->n = $n;
        } else {
            $msg = "The n attribute must be an integer or a variable reference, '" . gettype($n) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setN($n)
    {
        if (is_int($n) || (gettype($n) === 'string' && Format::isVariableRef($n))) {
            $this->n = $n;
        } else {
            $msg = "The n attribute must be an integer or a variable reference, '" . gettype($n) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setN ( $ n ) { if ( is_int ( $ n ) || ( gettype ( $ n ) === 'string' && Format :: isVariableRef ( $ n ) ) ) { $ this -> n = $ n ; } else { $ msg = "The n attribute must be an integer or a variable reference, '" . gettype ( $ n ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the n attribute.

@param integer|string $n The index to lookup. It must be an integer or a variable reference.
@throws \InvalidArgumentException If $n is not an integer nor a variable reference.
Set the n attribute .