Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure you want to rename?
SAFE MODE
/
application
/
vendor
/
zbateson
/
mail-mime-parser
/
src
/
Header
/
Part
:
LiteralPart.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * This file is part of the ZBateson\MailMimeParser project. * * @license http://opensource.org/licenses/bsd-license.php BSD */ namespace ZBateson\MailMimeParser\Header\Part; use ZBateson\MailMimeParser\Header\Part\HeaderPart; use ZBateson\MbWrapper\MbWrapper; /** * A literal header string part. The value of the part is stripped of CR and LF * characters, but otherwise not transformed or changed in any way. * * @author Zaahid Bateson */ class LiteralPart extends HeaderPart { /** * Creates a LiteralPart out of the passed string token * * @param MbWrapper $charsetConverter * @param string $token */ public function __construct(MbWrapper $charsetConverter, $token = null) { parent::__construct($charsetConverter); $this->value = $token; if ($token !== null) { $this->value = preg_replace('/\r|\n/', '', $this->convertEncoding($token)); } } }