public function setCredentials($name, $password = null, $domain = null)
    {
        $credentials = $this->getCredentials();

        $credentials['name']     = $name;
        $credentials['password'] = $password;
        $credentials['domain']   = $domain;

        $this->setAttribute('credentials', $credentials);

        return $this;
    }
public function setCredentials($name, $password = null, $domain = null)
    {
        $credentials = $this->getCredentials();

        $credentials['name']     = $name;
        $credentials['password'] = $password;
        $credentials['domain']   = $domain;

        $this->setAttribute('credentials', $credentials);

        return $this;
    }
public function setCredentials ( $ name , $ password = null , $ domain = null ) { $ credentials = $ this -> getCredentials ( ) ; $ credentials [ 'name' ] = $ name ; $ credentials [ 'password' ] = $ password ; $ credentials [ 'domain' ] = $ domain ; $ this -> setAttribute ( 'credentials' , $ credentials ) ; return $ this ; }
Sets the credentials to be used for the request.

@param string $name
@param string $password  optional
@param string $domain    optional, for NTLM and similar
@return $this
Sets the credentials to be used for the request .