/framework/vendor/swift/lib/classes/Swift/Mime/EmbeddedFile.php

http://zoop.googlecode.com/ · PHP · 51 lines · 16 code · 6 blank · 29 comment · 0 complexity · 811c16b324e0f9f69dcd23d4ad54db32 MD5 · raw file

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