public function setName($name)
    {
        if (is_string($name) === false) {
            $msg = "The 'name' argument must be a string value, '" . gettype($name) . "' given.";
            throw new InvalidArgumentException($msg);
        }

        $this->name = $name;
    }
public function setName($name)
    {
        if (is_string($name) === false) {
            $msg = "The 'name' argument must be a string value, '" . gettype($name) . "' given.";
            throw new InvalidArgumentException($msg);
        }

        $this->name = $name;
    }
public function setName ( $ name ) { if ( is_string ( $ name ) === false ) { $ msg = "The 'name' argument must be a string value, '" . gettype ( $ name ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } $ this -> name = $ name ; }
Set the name of the variable.

@param string $name The name of the variable without the leading dollar sign ('$').
@throws InvalidArgumentException If $name is not a string value.
Set the name of the variable .