public function setName($name)
    {
        if (in_array($name, MathEnumeration::asArray())) {
            $this->name = $name;
        } else {
            $msg = "${name} is not a valid QTI Math constant.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setName($name)
    {
        if (in_array($name, MathEnumeration::asArray())) {
            $this->name = $name;
        } else {
            $msg = "${name} is not a valid QTI Math constant.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setName ( $ name ) { if ( in_array ( $ name , MathEnumeration :: asArray ( ) ) ) { $ this -> name = $ name ; } else { $ msg = "${name} is not a valid QTI Math constant." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the name of the math constant.

@param string $name The name of the math constant.
@throws \InvalidArgumentException If $name is not a valid QTI math constant name.
Set the name of the math constant .