aboutsummaryrefslogtreecommitdiff
path: root/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2010-10-17 13:29:57 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2010-10-17 13:29:57 +0000
commit232aa1924c8c0f10d87b210b46c9f061af5c844c (patch)
tree2351f2aaff7ad244f60358954e4711692fb8aadc /h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php
parenta17e3e0495bee3705d3c1e5ead2db1a8359e64e9 (diff)
added files
Diffstat (limited to 'h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php')
-rw-r--r--h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php72
1 files changed, 72 insertions, 0 deletions
diff --git a/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php b/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php
new file mode 100644
index 0000000..e8f45f4
--- /dev/null
+++ b/h-source/External/swiftmailer/lib/classes/Swift/InputByteStream.php
@@ -0,0 +1,72 @@
+<?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.
+ */
+
+/**
+ * An abstract means of writing data.
+ * Classes implementing this interface may use a subsystem which requires less
+ * memory than working with large strings of data.
+ * @package Swift
+ * @subpackage ByteStream
+ * @author Chris Corbyn
+ */
+interface Swift_InputByteStream
+{
+
+ /**
+ * Writes $bytes to the end of the stream.
+ *
+ * Writing may not happen immediately if the stream chooses to buffer. If
+ * you want to write these bytes with immediate effect, call {@link commit()}
+ * after calling write().
+ *
+ * This method returns the sequence ID of the write (i.e. 1 for first, 2 for
+ * second, etc etc).
+ *
+ * @param string $bytes
+ * @return int
+ * @throws Swift_IoException
+ */
+ public function write($bytes);
+
+ /**
+ * For any bytes that are currently buffered inside the stream, force them
+ * off the buffer.
+ *
+ * @throws Swift_IoException
+ */
+ public function commit();
+
+ /**
+ * Attach $is to this stream.
+ * The stream acts as an observer, receiving all data that is written.
+ * All {@link write()} and {@link flushBuffers()} operations will be mirrored.
+ *
+ * @param Swift_InputByteStream $is
+ */
+ public function bind(Swift_InputByteStream $is);
+
+ /**
+ * Remove an already bound stream.
+ * If $is is not bound, no errors will be raised.
+ * If the stream currently has any buffered data it will be written to $is
+ * before unbinding occurs.
+ *
+ * @param Swift_InputByteStream $is
+ */
+ public function unbind(Swift_InputByteStream $is);
+
+ /**
+ * Flush the contents of the stream (empty it) and set the internal pointer
+ * to the beginning.
+ * @throws Swift_IoException
+ */
+ public function flushBuffers();
+
+}