OAuthSimple::setPath PHP Method

setPath() public method

Convenience method for setURL
See also: setURL
public setPath ( string $path ) : mixed
$path string
return mixed
    public function setPath($path)
    {
        return $this->_path = $path;
    }

Usage Example

 private function getOAuthHeader($location, $request)
 {
     try {
         $oauth = new OAuthSimple($this->getAccountId(), $this->getSharedKey());
         $oauth->setAction("POST");
         $oauth->genBodyHash($request);
         $parse = parse_url($location);
         $port = (isset($parse["port"]) and ($parse["port"] == '80' or $parse["port"] == '443')) ? '' : !isset($parse["port"]) ? '' : ':' . $parse["port"];
         if (!is_null($this->language)) {
             $oauth->setParameters(array('lang' => $this->language));
         }
         $oauth->setPath($parse["scheme"] . '://' . $parse["host"] . $port . $parse["path"]);
         $header_string = $oauth->getHeaderString();
         $oauth->reset();
     } catch (Exception $e) {
         throw new TurnitinSDKException('oautherror', $e->getMessage(), $this->getLogPath());
     }
     return $header_string;
 }
All Usage Examples Of OAuthSimple::setPath