|
0
|
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 |
/** |
|
|
13 |
* An embedded file, in a multipart message. |
|
|
14 |
* @package Swift |
|
|
15 |
* @subpackage Mime |
|
|
16 |
* @author Chris Corbyn |
|
|
17 |
*/ |
|
|
18 |
class Swift_Mime_EmbeddedFile extends Swift_Mime_Attachment |
|
|
19 |
{ |
|
|
20 |
|
|
|
21 |
/** |
|
|
22 |
* Creates a new Attachment with $headers and $encoder. |
|
|
23 |
* @param Swift_Mime_HeaderSet $headers |
|
|
24 |
* @param Swift_Mime_ContentEncoder $encoder |
|
|
25 |
* @param Swift_KeyCache $cache |
|
|
26 |
* @param Swift_Mime_Grammar $grammar |
|
|
27 |
* @param array $mimeTypes optional |
|
|
28 |
*/ |
|
|
29 |
public function __construct(Swift_Mime_HeaderSet $headers, |
|
|
30 |
Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, |
|
|
31 |
Swift_Mime_Grammar $grammar, $mimeTypes = array()) |
|
|
32 |
{ |
|
|
33 |
parent::__construct($headers, $encoder, $cache, $grammar, $mimeTypes); |
|
|
34 |
$this->setDisposition('inline'); |
|
|
35 |
$this->setId($this->getId()); |
|
|
36 |
} |
|
|
37 |
|
|
|
38 |
/** |
|
|
39 |
* Get the nesting level of this EmbeddedFile. |
|
|
40 |
* Returns {@link LEVEL_RELATED}. |
|
|
41 |
* @return int |
|
|
42 |
*/ |
|
|
43 |
public function getNestingLevel() |
|
|
44 |
{ |
|
|
45 |
return self::LEVEL_RELATED; |
|
|
46 |
} |
|
|
47 |
|
|
|
48 |
} |