OAuthSimple::setSignatureMethod PHP Method

setSignatureMethod() public method

Set the signature method (currently only Plaintext or SHA-MAC1)
public setSignatureMethod ( string $method = "" ) : string
$method string Method of signing the transaction (only PLAINTEXT and SHA-MAC1 allowed for now)
return string OAuthSimple
    public function setSignatureMethod($method = "")
    {
        if (empty($method)) {
            $method = $this->_default_signature_method;
        }
        $method = strtoupper($method);
        switch ($method) {
            case 'PLAINTEXT':
            case 'HMAC-SHA1':
                $this->_parameters['oauth_signature_method'] = $method;
                break;
            default:
                throw new OAuthSimpleException("Unknown signing method {$method} specified for OAuthSimple.setSignatureMethod");
                break;
        }
        return $this;
    }