lib/classes/Swift/Signers/SMimeSigner.php
protected function copyHeader(Swift_Message $fromMessage, Swift_Message $toMessage, $headerName)
    {
        $header = $fromMessage->getHeaders()->get($headerName);
        if (!$header) {
            return;
        }
        $headers = $toMessage->getHeaders();
        switch ($header->getFieldType()) {
            case Swift_Mime_Header::TYPE_TEXT:
                $headers->addTextHeader($header->getFieldName(), $header->getValue());
                break;
            case Swift_Mime_Header::TYPE_PARAMETERIZED:
                $headers->addParameterizedHeader(
                    $header->getFieldName(),
                    $header->getValue(),
                    $header->getParameters()
                );
                break;
        }
    }
protected function copyHeader(Swift_Message $fromMessage, Swift_Message $toMessage, $headerName)
    {
        $header = $fromMessage->getHeaders()->get($headerName);
        if (!$header) {
            return;
        }
        $headers = $toMessage->getHeaders();
        switch ($header->getFieldType()) {
            case Swift_Mime_Header::TYPE_TEXT:
                $headers->addTextHeader($header->getFieldName(), $header->getValue());
                break;
            case Swift_Mime_Header::TYPE_PARAMETERIZED:
                $headers->addParameterizedHeader(
                    $header->getFieldName(),
                    $header->getValue(),
                    $header->getParameters()
                );
                break;
        }
    }
protected function copyHeader ( Swift_Message $ fromMessage , Swift_Message $ toMessage , $ headerName ) { $ header = $ fromMessage -> getHeaders ( ) -> get ( $ headerName ) ; if ( ! $ header ) { return ; } $ headers = $ toMessage -> getHeaders ( ) ; switch ( $ header -> getFieldType ( ) ) { case Swift_Mime_Header :: TYPE_TEXT : $ headers -> addTextHeader ( $ header -> getFieldName ( ) , $ header -> getValue ( ) ) ; break ; case Swift_Mime_Header :: TYPE_PARAMETERIZED : $ headers -> addParameterizedHeader ( $ header -> getFieldName ( ) , $ header -> getValue ( ) , $ header -> getParameters ( ) ) ; break ; } }
Copy a single header from one Swift message to another.

@param string $headerName
Copy a single header from one Swift message to another .