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