public function setAuthentication($user, $password, $type = self::AUTH_TYPE_BASIC)
    {
        $this->setHeader(
            'Authorization',
            $this->makeAuthentication($user, $password, $type)
        );
    }
public function setAuthentication($user, $password, $type = self::AUTH_TYPE_BASIC)
    {
        $this->setHeader(
            'Authorization',
            $this->makeAuthentication($user, $password, $type)
        );
    }
public function setAuthentication ( $ user , $ password , $ type = self :: AUTH_TYPE_BASIC ) { $ this -> setHeader ( 'Authorization' , $ this -> makeAuthentication ( $ user , $ password , $ type ) ) ; }
Set authentication.

@param string $user
@param string $password
@param string $type Authentication type
Set authentication .