3 * File containing the ezcMailMultipartAlternativeParser class
7 * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
8 * @license http://ez.no/licenses/new_bsd New BSD License
12 * Parses multipart/mixed mail parts.
18 class ezcMailMultipartAlternativeParser
extends ezcMailMultipartParser
21 * Holds the ezcMailMultipartAlternative part corresponding to the data parsed with this parser.
23 * @var ezcMailMultipartAlternative
28 * Constructs a new ezcMailMultipartAlternativeParser.
30 * @param ezcMailHeadersHolder $headers
32 public function __construct( ezcMailHeadersHolder
$headers )
34 parent
::__construct( $headers );
35 $this->part
= new ezcMailMultipartAlternative();
39 * Adds the part $part to the list of multipart messages.
41 * This method is called automatically by ezcMailMultipartParser
42 * each time a part is parsed.
44 * @param ezcMailPart $part
46 public function partDone( ezcMailPart
$part )
48 $this->part
->appendPart( $part );
52 * Returns the parts parsed for this multipart.
54 * @return ezcMailMultipartAlternative
56 public function finishMultipart()
59 foreach ( $this->part
->getParts() as $part )
63 $this->part
->size
= $size;