1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: /**
12: * An embedded file, in a multipart message.
13: * @package Swift
14: * @subpackage Mime
15: * @author Chris Corbyn
16: */
17: class Swift_Mime_EmbeddedFile extends Swift_Mime_Attachment
18: {
19: /**
20: * Creates a new Attachment with $headers and $encoder.
21: * @param Swift_Mime_HeaderSet $headers
22: * @param Swift_Mime_ContentEncoder $encoder
23: * @param Swift_KeyCache $cache
24: * @param Swift_Mime_Grammar $grammar
25: * @param array $mimeTypes optional
26: */
27: public function __construct(Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $mimeTypes = array())
28: {
29: parent::__construct($headers, $encoder, $cache, $grammar, $mimeTypes);
30: $this->setDisposition('inline');
31: $this->setId($this->getId());
32: }
33:
34: /**
35: * Get the nesting level of this EmbeddedFile.
36: * Returns {@link LEVEL_RELATED}.
37: * @return int
38: */
39: public function getNestingLevel()
40: {
41: return self::LEVEL_RELATED;
42: }
43: }
44: