public function testParseContentDispositionReuse()
 {
     $cd = new ezcMailContentDispositionHeader();
     $cd->fileName = "obsession.txt";
     $input = "attachment; creation-date=\"Wed, 12 Feb 1997 16:29:51 -0500\"; modification-date=\"Wed, 12 Feb 1997 16:29:51 -0500\"; read-date=\"Wed, 12 Feb 1997 16:29:51 -0500\"; size=5423; hendrix=l33t";
     $cd = ezcMailRfc2231Implementation::parseContentDisposition($input, $cd);
     $this->assertEquals("obsession.txt", $cd->fileName);
 }
Beispiel #2
0
 /**
  * Scans through $headers and sets any specific header properties on $part.
  *
  * Currently we only have Content-Disposition on the ezcMailPart level.
  * All parser parts must call this method once.
  *
  * @param ezcMailHeadersHolder $headers
  * @param ezcMailPart $part
  */
 public static function parsePartHeaders(ezcMailHeadersHolder $headers, ezcMailPart $part)
 {
     if (isset($headers['Content-Disposition'])) {
         $part->contentDisposition = ezcMailRfc2231Implementation::parseContentDisposition($headers['Content-Disposition']);
     }
 }