PhpMimeMailParser\Parser::decodeContentTransfer PHP Метод

decodeContentTransfer() защищенный Метод

Decode the string from Content-Transfer-Encoding
protected decodeContentTransfer ( string $encodedString, string $encodingType ) : string
$encodedString string The string in its original encoded state
$encodingType string The encoding type from the Content-Transfer-Encoding header of the part.
Результат string The decoded string
    protected function decodeContentTransfer($encodedString, $encodingType)
    {
        $encodingType = strtolower($encodingType);
        if ($encodingType == 'base64') {
            return base64_decode($encodedString);
        } elseif ($encodingType == 'quoted-printable') {
            return quoted_printable_decode($encodedString);
        } else {
            return $encodedString;
            //8bit, 7bit, binary
        }
    }