aboutsummaryrefslogtreecommitdiff
path: root/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2021-10-14 15:16:42 +1100
committerYuchen Pei <hi@ypei.me>2021-10-14 15:16:42 +1100
commit07f5140771388c9e0c8a99b0dd2e5d950bdb173b (patch)
tree323c00faef1edc7dea2e88ff581cc2258b2b6432 /External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php
parente119be145500700f3c465e12664403a07530a421 (diff)
moving h-source subdir out.
Diffstat (limited to 'External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php')
-rwxr-xr-xExternal/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php108
1 files changed, 108 insertions, 0 deletions
diff --git a/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php b/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php
new file mode 100755
index 0000000..2b08009
--- /dev/null
+++ b/External/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php
@@ -0,0 +1,108 @@
+<?php
+
+/*
+ * This file is part of SwiftMailer.
+ * (c) 2004-2009 Chris Corbyn
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+//@require 'Swift/InputByteStream.php';
+//@require 'Swift/Mime/EncodingObserver.php';
+//@require 'Swift/Mime/CharsetObserver.php';
+
+/**
+ * A MIME entity, such as an attachment.
+ * @package Swift
+ * @subpackage Mime
+ * @author Chris Corbyn
+ */
+interface Swift_Mime_MimeEntity
+ extends Swift_Mime_CharsetObserver, Swift_Mime_EncodingObserver
+{
+
+ /** Main message document; there can only be one of these */
+ const LEVEL_TOP = 16;
+
+ /** An entity which nests with the same precedence as an attachment */
+ const LEVEL_MIXED = 256;
+
+ /** An entity which nests with the same precedence as a mime part */
+ const LEVEL_ALTERNATIVE = 4096;
+
+ /** An entity which nests with the same precedence as embedded content */
+ const LEVEL_RELATED = 65536;
+
+ /**
+ * Get the level at which this entity shall be nested in final document.
+ * The lower the value, the more outermost the entity will be nested.
+ * @return int
+ * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE
+ */
+ public function getNestingLevel();
+
+ /**
+ * Get the qualified content-type of this mime entity.
+ * @return string
+ */
+ public function getContentType();
+
+ /**
+ * Returns a unique ID for this entity.
+ * For most entities this will likely be the Content-ID, though it has
+ * no explicit semantic meaning and can be considered an identifier for
+ * programming logic purposes.
+ * If a Content-ID header is present, this value SHOULD match the value of
+ * the header.
+ * @return string
+ */
+ public function getId();
+
+ /**
+ * Get all children nested inside this entity.
+ * These are not just the immediate children, but all children.
+ * @return Swift_Mime_MimeEntity[]
+ */
+ public function getChildren();
+
+ /**
+ * Set all children nested inside this entity.
+ * This includes grandchildren.
+ * @param Swift_Mime_MimeEntity[] $children
+ */
+ public function setChildren(array $children);
+
+ /**
+ * Get the collection of Headers in this Mime entity.
+ * @return Swift_Mime_Header[]
+ */
+ public function getHeaders();
+
+ /**
+ * Get the body content of this entity as a string.
+ * Returns NULL if no body has been set.
+ * @return string
+ */
+ public function getBody();
+
+ /**
+ * Set the body content of this entity as a string.
+ * @param string $body
+ * @param string $contentType optional
+ */
+ public function setBody($body, $contentType = null);
+
+ /**
+ * Get this entire entity in its string form.
+ * @return string
+ */
+ public function toString();
+
+ /**
+ * Get this entire entity as a ByteStream.
+ * @param Swift_InputByteStream $is to write to
+ */
+ public function toByteStream(Swift_InputByteStream $is);
+
+}