public function setSignature($signature)
    {
        if (!empty($this->signers)) {
            // clear previously set signers
            $swiftMessage = $this->getSwiftMessage();
            foreach ($this->signers as $signer) {
                $swiftMessage->detachSigner($signer);
            }
            $this->signers = [];
        }
        return $this->addSignature($signature);
    }
public function setSignature($signature)
    {
        if (!empty($this->signers)) {
            // clear previously set signers
            $swiftMessage = $this->getSwiftMessage();
            foreach ($this->signers as $signer) {
                $swiftMessage->detachSigner($signer);
            }
            $this->signers = [];
        }
        return $this->addSignature($signature);
    }
public function setSignature ( $ signature ) { if ( ! empty ( $ this -> signers ) ) { // clear previously set signers $ swiftMessage = $ this -> getSwiftMessage ( ) ; foreach ( $ this -> signers as $ signer ) { $ swiftMessage -> detachSigner ( $ signer ) ; } $ this -> signers = [ ] ; } return $ this -> addSignature ( $ signature ) ; }
Sets message signature
@param array|callable|\Swift_Signer $signature signature specification.
See [[addSignature()]] for details on how it should be specified.
@return $this self reference.
@since 2.0.6
Sets message signature