lib/classes/Swift/Message.php
protected function doSign()
    {
        foreach ($this->bodySigners as $signer) {
            $altered = $signer->getAlteredHeaders();
            $this->saveHeaders($altered);
            $signer->signMessage($this);
        }

        foreach ($this->headerSigners as $signer) {
            $altered = $signer->getAlteredHeaders();
            $this->saveHeaders($altered);
            $signer->reset();

            $signer->setHeaders($this->getHeaders());

            $signer->startBody();
            $this->bodyToByteStream($signer);
            $signer->endBody();

            $signer->addSignature($this->getHeaders());
        }
    }
protected function doSign()
    {
        foreach ($this->bodySigners as $signer) {
            $altered = $signer->getAlteredHeaders();
            $this->saveHeaders($altered);
            $signer->signMessage($this);
        }

        foreach ($this->headerSigners as $signer) {
            $altered = $signer->getAlteredHeaders();
            $this->saveHeaders($altered);
            $signer->reset();

            $signer->setHeaders($this->getHeaders());

            $signer->startBody();
            $this->bodyToByteStream($signer);
            $signer->endBody();

            $signer->addSignature($this->getHeaders());
        }
    }
protected function doSign ( ) { foreach ( $ this -> bodySigners as $ signer ) { $ altered = $ signer -> getAlteredHeaders ( ) ; $ this -> saveHeaders ( $ altered ) ; $ signer -> signMessage ( $ this ) ; } foreach ( $ this -> headerSigners as $ signer ) { $ altered = $ signer -> getAlteredHeaders ( ) ; $ this -> saveHeaders ( $ altered ) ; $ signer -> reset ( ) ; $ signer -> setHeaders ( $ this -> getHeaders ( ) ) ; $ signer -> startBody ( ) ; $ this -> bodyToByteStream ( $ signer ) ; $ signer -> endBody ( ) ; $ signer -> addSignature ( $ this -> getHeaders ( ) ) ; } }
loops through signers and apply the signatures.
loops through signers and apply the signatures .