public function setDomain($domain)
    {
        try {
            $this->domain = (string) $domain;
        } catch (Exception $e) {
            throw new InvalidArgumentException(
                'Value provided as domain is not a string'
            );
        }

        return $this;
    }
public function setDomain($domain)
    {
        try {
            $this->domain = (string) $domain;
        } catch (Exception $e) {
            throw new InvalidArgumentException(
                'Value provided as domain is not a string'
            );
        }

        return $this;
    }
public function setDomain ( $ domain ) { try { $ this -> domain = ( string ) $ domain ; } catch ( Exception $ e ) { throw new InvalidArgumentException ( 'Value provided as domain is not a string' ) ; } return $ this ; }
Updates the provider domain with a given value.

@throws  InvalidArgumentException
@param string $domain
@return  Salesforce
Updates the provider domain with a given value .