public function setName($name)
    {
        if (in_array($name, MathFunctions::asArray())) {
            $this->name = $name;
        } else {
            $msg = "The name attribute must be a value from the MathFunctions enumeration, '" . $name . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setName($name)
    {
        if (in_array($name, MathFunctions::asArray())) {
            $this->name = $name;
        } else {
            $msg = "The name attribute must be a value from the MathFunctions enumeration, '" . $name . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setName ( $ name ) { if ( in_array ( $ name , MathFunctions :: asArray ( ) ) ) { $ this -> name = $ name ; } else { $ msg = "The name attribute must be a value from the MathFunctions enumeration, '" . $ name . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the name of the math function to use.

@param integer $name A value from the MathFunctions enumeration.
@throws \InvalidArgumentException If $name is not a value from the MathFunctions enumeration.
Set the name of the math function to use .