consumer = $consumer; $this->requestToken = null; $this->accessToken = null; $this->tokenSecret = null; } public function getProperty($name) { return $this->properties[$name]; } public function setProperty($name, $value) { $this->properties[$name] = $value; } public function newRequestMessage($method, $url, $parameters) { if (! isset($method)) { $method = $this->getProperty("httpMethod"); if ($method == null) { $method = $this->consumer->getProperty("httpMethod"); if ($method == null) { $method = "GET"; } } } $message = OAuthRequest::from_consumer_and_token($this->consumer, $this->accessToken, $method, $url, $parameters); $signatureMethod = null; if ($parameters[OAuth::$OAUTH_SIGNATURE_METHOD] == OAuth::$RSA_SHA1) { $signatureMethod = new OAuthSignatureMethod_RSA_SHA1(); } else if ($parameters[OAuth::$OAUTH_SIGNATURE_METHOD] == OAuth::$HMAC_SHA1) { $signatureMethod = new OAuthSignatureMethod_HMAC_SHA1(); } else { //PLAINTEXT $signatureMethod = new OAuthSignatureMethod_PLAINTEXT(); } $message->sign_request($signatureMethod, $this->consumer, $this->tokenSecret); return $message; } }