Ejemplo n.º 1
0
 public function __construct($body = null, Parser $parser = null)
 {
     $this->parser = $parser;
     if ($parser instanceof Parser) {
         if ($html = $this->parser->getMessageBody('html')) {
             $this->body = $this->toPlainText($html);
         } else {
             $this->body = $this->getParser()->getMessageBody('text');
         }
     } else {
         $this->body = $this->toPlainText($body);
     }
     $this->splitLines();
     $this->processLines();
     $this->joinLines();
 }