private function getSignature(Request $request)
    {
        switch ($this->getSignatureMethod()) {
            case self::SIGNATURE_RSA_SHA1:
                $signature = RSASHA1::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            case self::SIGNATURE_HMAC_SHA1:
                $signature = HMACSHA1::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            case self::SIGNATURE_PLAINTEXT:
                $signature = PLAINTEXT::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            default:
                throw new Exception(
                    "Invalid signature method [{$this->config['signature_method']}]"
                );
        }

        return $signature;
    }
private function getSignature(Request $request)
    {
        switch ($this->getSignatureMethod()) {
            case self::SIGNATURE_RSA_SHA1:
                $signature = RSASHA1::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            case self::SIGNATURE_HMAC_SHA1:
                $signature = HMACSHA1::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            case self::SIGNATURE_PLAINTEXT:
                $signature = PLAINTEXT::generateSignature(
                    $this->config,
                    $this->getSBS($request),
                    $this->getSigningSecret()
                );

                break;
            default:
                throw new Exception(
                    "Invalid signature method [{$this->config['signature_method']}]"
                );
        }

        return $signature;
    }
private function getSignature ( Request $ request ) { switch ( $ this -> getSignatureMethod ( ) ) { case self :: SIGNATURE_RSA_SHA1 : $ signature = RSASHA1 :: generateSignature ( $ this -> config , $ this -> getSBS ( $ request ) , $ this -> getSigningSecret ( ) ) ; break ; case self :: SIGNATURE_HMAC_SHA1 : $ signature = HMACSHA1 :: generateSignature ( $ this -> config , $ this -> getSBS ( $ request ) , $ this -> getSigningSecret ( ) ) ; break ; case self :: SIGNATURE_PLAINTEXT : $ signature = PLAINTEXT :: generateSignature ( $ this -> config , $ this -> getSBS ( $ request ) , $ this -> getSigningSecret ( ) ) ; break ; default : throw new Exception ( "Invalid signature method [{$this->config['signature_method']}]" ) ; } return $ signature ; }
Call the appropriate signature method's signing function.
Not all mechanisms use all of the parameters, but for
consistency, pass the same constructor to each one.

@param Request $request
@throws Exception
@return string
Call the appropriate signature method s signing function . Not all mechanisms use all of the parameters but for consistency pass the same constructor to each one .