Browse Source

Include SwiftMailer

master
Sven Slootweg 9 years ago
parent
commit
8eab3e0e54
  1. 81
      public_html/lib/swiftmailer/classes/Swift.php
  2. 73
      public_html/lib/swiftmailer/classes/Swift/Attachment.php
  3. 183
      public_html/lib/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php
  4. 186
      public_html/lib/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php
  5. 222
      public_html/lib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php
  6. 44
      public_html/lib/swiftmailer/classes/Swift/ByteStream/TemporaryFileByteStream.php
  7. 69
      public_html/lib/swiftmailer/classes/Swift/CharacterReader.php
  8. 99
      public_html/lib/swiftmailer/classes/Swift/CharacterReader/GenericFixedWidthReader.php
  9. 85
      public_html/lib/swiftmailer/classes/Swift/CharacterReader/UsAsciiReader.php
  10. 181
      public_html/lib/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php
  11. 28
      public_html/lib/swiftmailer/classes/Swift/CharacterReaderFactory.php
  12. 126
      public_html/lib/swiftmailer/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php
  13. 91
      public_html/lib/swiftmailer/classes/Swift/CharacterStream.php
  14. 296
      public_html/lib/swiftmailer/classes/Swift/CharacterStream/ArrayCharacterStream.php
  15. 277
      public_html/lib/swiftmailer/classes/Swift/CharacterStream/NgCharacterStream.php
  16. 64
      public_html/lib/swiftmailer/classes/Swift/ConfigurableSpool.php
  17. 373
      public_html/lib/swiftmailer/classes/Swift/DependencyContainer.php
  18. 28
      public_html/lib/swiftmailer/classes/Swift/DependencyException.php
  19. 71
      public_html/lib/swiftmailer/classes/Swift/EmbeddedFile.php
  20. 29
      public_html/lib/swiftmailer/classes/Swift/Encoder.php
  21. 60
      public_html/lib/swiftmailer/classes/Swift/Encoder/Base64Encoder.php
  22. 286
      public_html/lib/swiftmailer/classes/Swift/Encoder/QpEncoder.php
  23. 86
      public_html/lib/swiftmailer/classes/Swift/Encoder/Rfc2231Encoder.php
  24. 66
      public_html/lib/swiftmailer/classes/Swift/Encoding.php
  25. 67
      public_html/lib/swiftmailer/classes/Swift/Events/CommandEvent.php
  26. 26
      public_html/lib/swiftmailer/classes/Swift/Events/CommandListener.php
  27. 40
      public_html/lib/swiftmailer/classes/Swift/Events/Event.php
  28. 85
      public_html/lib/swiftmailer/classes/Swift/Events/EventDispatcher.php
  29. 20
      public_html/lib/swiftmailer/classes/Swift/Events/EventListener.php
  30. 65
      public_html/lib/swiftmailer/classes/Swift/Events/EventObject.php
  31. 68
      public_html/lib/swiftmailer/classes/Swift/Events/ResponseEvent.php
  32. 26
      public_html/lib/swiftmailer/classes/Swift/Events/ResponseListener.php
  33. 128
      public_html/lib/swiftmailer/classes/Swift/Events/SendEvent.php
  34. 33
      public_html/lib/swiftmailer/classes/Swift/Events/SendListener.php
  35. 161
      public_html/lib/swiftmailer/classes/Swift/Events/SimpleEventDispatcher.php
  36. 29
      public_html/lib/swiftmailer/classes/Swift/Events/TransportChangeEvent.php
  37. 47
      public_html/lib/swiftmailer/classes/Swift/Events/TransportChangeListener.php
  38. 48
      public_html/lib/swiftmailer/classes/Swift/Events/TransportExceptionEvent.php
  39. 26
      public_html/lib/swiftmailer/classes/Swift/Events/TransportExceptionListener.php
  40. 47
      public_html/lib/swiftmailer/classes/Swift/FailoverTransport.php
  41. 201
      public_html/lib/swiftmailer/classes/Swift/FileSpool.php
  42. 26
      public_html/lib/swiftmailer/classes/Swift/FileStream.php
  43. 33
      public_html/lib/swiftmailer/classes/Swift/Filterable.php
  44. 63
      public_html/lib/swiftmailer/classes/Swift/Image.php
  45. 77
      public_html/lib/swiftmailer/classes/Swift/InputByteStream.php
  46. 28
      public_html/lib/swiftmailer/classes/Swift/IoException.php
  47. 107
      public_html/lib/swiftmailer/classes/Swift/KeyCache.php
  48. 210
      public_html/lib/swiftmailer/classes/Swift/KeyCache/ArrayKeyCache.php
  49. 328
      public_html/lib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php
  50. 53
      public_html/lib/swiftmailer/classes/Swift/KeyCache/KeyCacheInputStream.php
  51. 117
      public_html/lib/swiftmailer/classes/Swift/KeyCache/NullKeyCache.php
  52. 129
      public_html/lib/swiftmailer/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php
  53. 47
      public_html/lib/swiftmailer/classes/Swift/LoadBalancedTransport.php
  54. 47
      public_html/lib/swiftmailer/classes/Swift/MailTransport.php
  55. 115
      public_html/lib/swiftmailer/classes/Swift/Mailer.php
  56. 57
      public_html/lib/swiftmailer/classes/Swift/Mailer/ArrayRecipientIterator.php
  57. 34
      public_html/lib/swiftmailer/classes/Swift/Mailer/RecipientIterator.php
  58. 84
      public_html/lib/swiftmailer/classes/Swift/MemorySpool.php
  59. 85
      public_html/lib/swiftmailer/classes/Swift/Message.php
  60. 155
      public_html/lib/swiftmailer/classes/Swift/Mime/Attachment.php
  61. 26
      public_html/lib/swiftmailer/classes/Swift/Mime/CharsetObserver.php
  62. 36
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder.php
  63. 69
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php
  64. 75
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php
  65. 167
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php
  66. 125
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php
  67. 65
      public_html/lib/swiftmailer/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php
  68. 47
      public_html/lib/swiftmailer/classes/Swift/Mime/EmbeddedFile.php
  69. 26
      public_html/lib/swiftmailer/classes/Swift/Mime/EncodingObserver.php
  70. 178
      public_html/lib/swiftmailer/classes/Swift/Mime/Grammar.php
  71. 95
      public_html/lib/swiftmailer/classes/Swift/Mime/Header.php
  72. 26
      public_html/lib/swiftmailer/classes/Swift/Mime/HeaderEncoder.php
  73. 57
      public_html/lib/swiftmailer/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php
  74. 67
      public_html/lib/swiftmailer/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php
  75. 80
      public_html/lib/swiftmailer/classes/Swift/Mime/HeaderFactory.php
  76. 171
      public_html/lib/swiftmailer/classes/Swift/Mime/HeaderSet.php
  77. 502
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/AbstractHeader.php
  78. 127
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/DateHeader.php
  79. 183
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/IdentificationHeader.php
  80. 358
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php
  81. 265
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/ParameterizedHeader.php
  82. 146
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/PathHeader.php
  83. 114
      public_html/lib/swiftmailer/classes/Swift/Mime/Headers/UnstructuredHeader.php
  84. 225
      public_html/lib/swiftmailer/classes/Swift/Mime/Message.php
  85. 117
      public_html/lib/swiftmailer/classes/Swift/Mime/MimeEntity.php
  86. 218
      public_html/lib/swiftmailer/classes/Swift/Mime/MimePart.php
  87. 36
      public_html/lib/swiftmailer/classes/Swift/Mime/ParameterizedHeader.php
  88. 192
      public_html/lib/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php
  89. 387
      public_html/lib/swiftmailer/classes/Swift/Mime/SimpleHeaderSet.php
  90. 655
      public_html/lib/swiftmailer/classes/Swift/Mime/SimpleMessage.php
  91. 857
      public_html/lib/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php
  92. 61
      public_html/lib/swiftmailer/classes/Swift/MimePart.php
  93. 40
      public_html/lib/swiftmailer/classes/Swift/NullTransport.php
  94. 48
      public_html/lib/swiftmailer/classes/Swift/OutputByteStream.php
  95. 143
      public_html/lib/swiftmailer/classes/Swift/Plugins/AntiFloodPlugin.php
  96. 166
      public_html/lib/swiftmailer/classes/Swift/Plugins/BandwidthMonitorPlugin.php
  97. 33
      public_html/lib/swiftmailer/classes/Swift/Plugins/Decorator/Replacements.php
  98. 211
      public_html/lib/swiftmailer/classes/Swift/Plugins/DecoratorPlugin.php
  99. 70
      public_html/lib/swiftmailer/classes/Swift/Plugins/ImpersonatePlugin.php
  100. 38
      public_html/lib/swiftmailer/classes/Swift/Plugins/Logger.php

81
public_html/lib/swiftmailer/classes/Swift.php

@ -0,0 +1,81 @@
<?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.
*/
/**
* General utility class in Swift Mailer, not to be instantiated.
*
* @package Swift
*
* @author Chris Corbyn
*/
abstract class Swift
{
public static $initialized = false;
public static $inits = array();
/** Swift Mailer Version number generated during dist release process */
const VERSION = '4.3.0';
/**
* Registers an initializer callable that will be called the first time
* a SwiftMailer class is autoloaded.
*
* This enables you to tweak the default configuration in a lazy way.
*
* @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class
*/
public static function init($callable)
{
self::$inits[] = $callable;
}
/**
* Internal autoloader for spl_autoload_register().
*
* @param string $class
*/
public static function autoload($class)
{
//Don't interfere with other autoloaders
if (0 !== strpos($class, 'Swift_')) {
return;
}
$path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php';
if (!file_exists($path)) {
return;
}
require $path;
if (self::$inits && !self::$initialized) {
self::$initialized = true;
foreach (self::$inits as $init) {
call_user_func($init);
}
}
}
/**
* Configure autoloading using Swift Mailer.
*
* This is designed to play nicely with other autoloaders.
*
* @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class
*/
public static function registerAutoload($callable = null)
{
if (null !== $callable) {
self::$inits[] = $callable;
}
spl_autoload_register(array('Swift', 'autoload'));
}
}

73
public_html/lib/swiftmailer/classes/Swift/Attachment.php

@ -0,0 +1,73 @@
<?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.
*/
/**
* Attachment class for attaching files to a {@link Swift_Mime_Message}.
*
* @package Swift
* @subpackage Mime
* @author Chris Corbyn
*/
class Swift_Attachment extends Swift_Mime_Attachment
{
/**
* Create a new Attachment.
*
* Details may be optionally provided to the constructor.
*
* @param string|Swift_OutputByteStream $data
* @param string $filename
* @param string $contentType
*/
public function __construct($data = null, $filename = null, $contentType = null)
{
call_user_func_array(
array($this, 'Swift_Mime_Attachment::__construct'),
Swift_DependencyContainer::getInstance()
->createDependenciesFor('mime.attachment')
);
$this->setBody($data);
$this->setFilename($filename);
if ($contentType) {
$this->setContentType($contentType);
}
}
/**
* Create a new Attachment.
*
* @param string|Swift_OutputByteStream $data
* @param string $filename
* @param string $contentType
*
* @return Swift_Mime_Attachment
*/
public static function newInstance($data = null, $filename = null, $contentType = null)
{
return new self($data, $filename, $contentType);
}
/**
* Create a new Attachment from a filesystem path.
*
* @param string $path
* @param string $contentType optional
*
* @return Swift_Mime_Attachment
*/
public static function fromPath($path, $contentType = null)
{
return self::newInstance()->setFile(
new Swift_ByteStream_FileByteStream($path),
$contentType
);
}
}

183
public_html/lib/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php

@ -0,0 +1,183 @@
<?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.
*/
/**
* Provides the base functionality for an InputStream supporting filters.
*
* @package Swift
* @subpackage ByteStream
* @author Chris Corbyn
*/
abstract class Swift_ByteStream_AbstractFilterableInputStream implements Swift_InputByteStream, Swift_Filterable
{
/**
* Write sequence.
*/
protected $_sequence = 0;
/**
* StreamFilters.
*/
private $_filters = array();
/**
* A buffer for writing.
*/
private $_writeBuffer = '';
/**
* Bound streams.
*
* @var Swift_InputByteStream[]
*/
private $_mirrors = array();
/**
* Commit the given bytes to the storage medium immediately.
*
* @param string $bytes
*/
abstract protected function _commit($bytes);
/**
* Flush any buffers/content with immediate effect.
*/
abstract protected function _flush();
/**
* Add a StreamFilter to this InputByteStream.
*
* @param Swift_StreamFilter $filter
* @param string $key
*/
public function addFilter(Swift_StreamFilter $filter, $key)
{
$this->_filters[$key] = $filter;
}
/**
* Remove an already present StreamFilter based on its $key.
*
* @param string $key
*/
public function removeFilter($key)
{
unset($this->_filters[$key]);
}
/**
* Writes $bytes to the end of the stream.
*
* @param string $bytes
*
* @return integer
*
* @throws Swift_IoException
*/
public function write($bytes)
{
$this->_writeBuffer .= $bytes;
foreach ($this->_filters as $filter) {
if ($filter->shouldBuffer($this->_writeBuffer)) {
return;
}
}
$this->_doWrite($this->_writeBuffer);
return ++$this->_sequence;
}
/**
* For any bytes that are currently buffered inside the stream, force them
* off the buffer.
*
* @throws Swift_IoException
*/
public function commit()
{
$this->_doWrite($this->_writeBuffer);
}
/**
* 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)
{
$this->_mirrors[] = $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)
{
foreach ($this->_mirrors as $k => $stream) {
if ($is === $stream) {
if ($this->_writeBuffer !== '') {
$stream->write($this->_filter($this->_writeBuffer));
}
unset($this->_mirrors[$k]);
}
}
}
/**
* Flush the contents of the stream (empty it) and set the internal pointer
* to the beginning.
*
* @throws Swift_IoException
*/
public function flushBuffers()
{
if ($this->_writeBuffer !== '') {
$this->_doWrite($this->_writeBuffer);
}
$this->_flush();
foreach ($this->_mirrors as $stream) {
$stream->flushBuffers();
}
}
// -- Private methods
/** Run $bytes through all filters */
private function _filter($bytes)
{
foreach ($this->_filters as $filter) {
$bytes = $filter->filter($bytes);
}
return $bytes;
}
/** Just write the bytes to the stream */
private function _doWrite($bytes)
{
$this->_commit($this->_filter($bytes));
foreach ($this->_mirrors as $stream) {
$stream->write($bytes);
}
$this->_writeBuffer = '';
}
}

186
public_html/lib/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php

@ -0,0 +1,186 @@
<?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.
*/
/**
* Allows reading and writing of bytes to and from an array.
*
* @package Swift
* @subpackage ByteStream
* @author Chris Corbyn
*/
class Swift_ByteStream_ArrayByteStream implements Swift_InputByteStream, Swift_OutputByteStream
{
/**
* The internal stack of bytes.
*
* @var string[]
*/
private $_array = array();
/**
* The size of the stack
*
* @var integer
*/
private $_arraySize = 0;
/**
* The internal pointer offset.
*
* @var integer
*/
private $_offset = 0;
/**
* Bound streams.
*
* @var Swift_InputByteStream[]
*/
private $_mirrors = array();
/**
* Create a new ArrayByteStream.
*
* If $stack is given the stream will be populated with the bytes it contains.
*
* @param mixed $stack of bytes in string or array form, optional
*/
public function __construct($stack = null)
{
if (is_array($stack)) {
$this->_array = $stack;
$this->_arraySize = count($stack);
} elseif (is_string($stack)) {
$this->write($stack);
} else {
$this->_array = array();
}
}
/**
* Reads $length bytes from the stream into a string and moves the pointer
* through the stream by $length.
*
* If less bytes exist than are requested the
* remaining bytes are given instead. If no bytes are remaining at all, boolean
* false is returned.
*
* @param integer $length
*
* @return string
*/
public function read($length)
{
if ($this->_offset == $this->_arraySize) {
return false;
}
// Don't use array slice
$end = $length + $this->_offset;
$end = $this->_arraySize<$end
?$this->_arraySize
:$end;
$ret = '';
for (; $this->_offset < $end; ++$this->_offset) {
$ret .= $this->_array[$this->_offset];
}
return $ret;
}
/**
* Writes $bytes to the end of the stream.
*
* @param string $bytes
*/
public function write($bytes)
{
$to_add = str_split($bytes);
foreach ($to_add as $value) {
$this->_array[] = $value;
}
$this->_arraySize = count($this->_array);
foreach ($this->_mirrors as $stream) {
$stream->write($bytes);
}
}
/**
* Not used.
*/
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)
{
$this->_mirrors[] = $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)
{
foreach ($this->_mirrors as $k => $stream) {
if ($is === $stream) {
unset($this->_mirrors[$k]);
}
}
}
/**
* Move the internal read pointer to $byteOffset in the stream.
*
* @param integer $byteOffset
*
* @return boolean
*/
public function setReadPointer($byteOffset)
{
if ($byteOffset > $this->_arraySize) {
$byteOffset = $this->_arraySize;
} elseif ($byteOffset < 0) {
$byteOffset = 0;
}
$this->_offset = $byteOffset;
}
/**
* Flush the contents of the stream (empty it) and set the internal pointer
* to the beginning.
*/
public function flushBuffers()
{
$this->_offset = 0;
$this->_array = array();
$this->_arraySize = 0;
foreach ($this->_mirrors as $stream) {
$stream->flushBuffers();
}
}
}

222
public_html/lib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php

@ -0,0 +1,222 @@
<?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.
*/
/**
* Allows reading and writing of bytes to and from a file.
*
* @package Swift
* @subpackage ByteStream
* @author Chris Corbyn
*/
class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterableInputStream implements Swift_FileStream
{
/** The internal pointer offset */
private $_offset = 0;
/** The path to the file */
private $_path;
/** The mode this file is opened in for writing */
private $_mode;
/** A lazy-loaded resource handle for reading the file */
private $_reader;
/** A lazy-loaded resource handle for writing the file */
private $_writer;
/** If magic_quotes_runtime is on, this will be true */
private $_quotes = false;
/** If stream is seekable true/false, or null if not known */
private $_seekable = null;
/**
* Create a new FileByteStream for $path.
*
* @param string $path
* @param boolean $writable if true
*/
public function __construct($path, $writable = false)
{
$this->_path = $path;
$this->_mode = $writable ? 'w+b' : 'rb';
if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) {
$this->_quotes = true;
}
}
/**
* Get the complete path to the file.
*
* @return string
*/
public function getPath()
{
return $this->_path;
}
/**
* Reads $length bytes from the stream into a string and moves the pointer
* through the stream by $length.
*
* If less bytes exist than are requested the
* remaining bytes are given instead. If no bytes are remaining at all, boolean
* false is returned.
*
* @param integer $length
*
* @return string
*
* @throws Swift_IoException
*/
public function read($length)
{
$fp = $this->_getReadHandle();
if (!feof($fp)) {
if ($this->_quotes) {
ini_set('magic_quotes_runtime', 0);
}
$bytes = fread($fp, $length);
if ($this->_quotes) {
ini_set('magic_quotes_runtime', 1);
}
$this->_offset = ftell($fp);
return $bytes;
} else {
$this->_resetReadHandle();
return false;
}
}
/**
* Move the internal read pointer to $byteOffset in the stream.
*
* @param integer $byteOffset
*
* @return boolean
*/
public function setReadPointer($byteOffset)
{
if (isset($this->_reader)) {
$this->_seekReadStreamToPosition($byteOffset);
}
$this->_offset = $byteOffset;
}
// -- Private methods
/** Just write the bytes to the file */
protected function _commit($bytes)
{
fwrite($this->_getWriteHandle(), $bytes);
$this->_resetReadHandle();
}
/** Not used */
protected function _flush()
{
}
/** Get the resource for reading */
private function _getReadHandle()
{
if (!isset($this->_reader)) {
if (!$this->_reader = fopen($this->_path, 'rb')) {
throw new Swift_IoException(
'Unable to open file for reading [' . $this->_path . ']'
);
}
if ($this->_offset <> 0) {
$this->_getReadStreamSeekableStatus();
$this->_seekReadStreamToPosition($this->_offset);
}
}
return $this->_reader;
}
/** Get the resource for writing */
private function _getWriteHandle()
{
if (!isset($this->_writer)) {
if (!$this->_writer = fopen($this->_path, $this->_mode)) {
throw new Swift_IoException(
'Unable to open file for writing [' . $this->_path . ']'
);
}
}
return $this->_writer;
}
/** Force a reload of the resource for reading */
private function _resetReadHandle()
{
if (isset($this->_reader)) {
fclose($this->_reader);
$this->_reader = null;
}
}
/** Check if ReadOnly Stream is seekable */
private function _getReadStreamSeekableStatus()
{
$metas = stream_get_meta_data($this->_reader);
$this->_seekable = $metas['seekable'];
}
/** Streams in a readOnly stream ensuring copy if needed */
private function _seekReadStreamToPosition($offset)
{
if ($this->_seekable===null) {
$this->_getReadStreamSeekableStatus();
}
if ($this->_seekable === false) {
$currentPos = ftell($this->_reader);
if ($currentPos<$offset) {
$toDiscard = $offset-$currentPos;
fread($this->_reader, $toDiscard);
return;
}
$this->_copyReadStream();
}
fseek($this->_reader, $offset, SEEK_SET);
}
/** Copy a readOnly Stream to ensure seekability */
private function _copyReadStream()
{
if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) {
/* We have opened a php:// Stream Should work without problem */
} elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) {
/* We have opened a tmpfile */
} else {
throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available');
}
$currentPos = ftell($this->_reader);
fclose($this->_reader);
$source = fopen($this->_path, 'rb');
if (!$source) {
throw new Swift_IoException('Unable to open file for copying [' . $this->_path . ']');
}
fseek($tmpFile, 0, SEEK_SET);
while (!feof($source)) {
fwrite($tmpFile, fread($source, 4096));
}
fseek($tmpFile, $currentPos, SEEK_SET);
fclose($source);
$this->_reader = $tmpFile;
}
}

44
public_html/lib/swiftmailer/classes/Swift/ByteStream/TemporaryFileByteStream.php

@ -0,0 +1,44 @@
<?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.
*/
/**
* @package Swift
* @subpackage ByteStream
* @author Romain-Geissler
*/
class Swift_ByteStream_TemporaryFileByteStream extends Swift_ByteStream_FileByteStream
{
public function __construct()
{
$filePath = tempnam(sys_get_temp_dir(), 'FileByteStream');
if ($filePath === false) {
throw new Swift_IoException('Failed to retrieve temporary file name.');
}
parent::__construct($filePath, true);
}
public function getContent()
{
if (($content = file_get_contents($this->getPath())) === false) {
throw new Swift_IoException('Failed to get temporary file content.');
}
return $content;
}
public function __destruct()
{
if (file_exists($this->getPath())) {
@unlink($this->getPath());
}
}
}

69
public_html/lib/swiftmailer/classes/Swift/CharacterReader.php

@ -0,0 +1,69 @@
<?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.
*/
/**
* Analyzes characters for a specific character set.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
* @author Xavier De Cock <xdecock@gmail.com>
*/
interface Swift_CharacterReader
{
const MAP_TYPE_INVALID = 0x01;
const MAP_TYPE_FIXED_LEN = 0x02;
const MAP_TYPE_POSITIONS = 0x03;
/**
* Returns the complete character map
*
* @param string $string
* @param integer $startOffset
* @param array $currentMap
* @param mixed $ignoredChars
*
* @return integer
*/
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars);
/**
* Returns the mapType, see constants.
*
* @return integer
*/
public function getMapType();
/**
* Returns an integer which specifies how many more bytes to read.
*
* A positive integer indicates the number of more bytes to fetch before invoking
* this method again.
*
* A value of zero means this is already a valid character.
* A value of -1 means this cannot possibly be a valid character.
*
* @param integer[] $bytes
* @param integer $size
*
* @return integer
*/
public function validateByteSequence($bytes, $size);
/**
* Returns the number of bytes which should be read to start each character.
*
* For fixed width character sets this should be the number of octets-per-character.
* For multibyte character sets this will probably be 1.
*
* @return integer
*/
public function getInitialByteSize();
}

99
public_html/lib/swiftmailer/classes/Swift/CharacterReader/GenericFixedWidthReader.php

@ -0,0 +1,99 @@
<?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.
*/
/**
* Provides fixed-width byte sizes for reading fixed-width character sets.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
* @author Xavier De Cock <xdecock@gmail.com>
*/
class Swift_CharacterReader_GenericFixedWidthReader implements Swift_CharacterReader
{
/**
* The number of bytes in a single character.
*
* @var integer
*/
private $_width;
/**
* Creates a new GenericFixedWidthReader using $width bytes per character.
*
* @param integer $width
*/
public function __construct($width)
{
$this->_width = $width;
}
/**
* Returns the complete character map.
*
* @param string $string
* @param integer $startOffset
* @param array $currentMap
* @param mixed $ignoredChars
*
* @return integer
*/
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
{
$strlen = strlen($string);
// % and / are CPU intensive, so, maybe find a better way
$ignored = $strlen % $this->_width;
$ignoredChars = substr($string, - $ignored);
$currentMap = $this->_width;
return ($strlen - $ignored) / $this->_width;
}
/**
* Returns the mapType.
*
* @return integer
*/
public function getMapType()
{
return self::MAP_TYPE_FIXED_LEN;
}
/**
* Returns an integer which specifies how many more bytes to read.
*
* A positive integer indicates the number of more bytes to fetch before invoking
* this method again.
*
* A value of zero means this is already a valid character.
* A value of -1 means this cannot possibly be a valid character.
*
* @param string $bytes
* @param integer $size
*
* @return integer
*/
public function validateByteSequence($bytes, $size)
{
$needed = $this->_width - $size;
return ($needed > -1) ? $needed : -1;
}
/**
* Returns the number of bytes which should be read to start each character.
*
* @return integer
*/
public function getInitialByteSize()
{
return $this->_width;
}
}

85
public_html/lib/swiftmailer/classes/Swift/CharacterReader/UsAsciiReader.php

@ -0,0 +1,85 @@
<?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.
*/
/**
* Analyzes US-ASCII characters.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
*/
class Swift_CharacterReader_UsAsciiReader implements Swift_CharacterReader
{
/**
* Returns the complete character map.
*
* @param string $string
* @param integer $startOffset
* @param array $currentMap
* @param string $ignoredChars
*
* @return integer
*/
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
{
$strlen=strlen($string);
$ignoredChars='';
for ($i = 0; $i < $strlen; ++$i) {
if ($string[$i]>"\x07F") { // Invalid char
$currentMap[$i+$startOffset]=$string[$i];
}
}
return $strlen;
}
/**
* Returns mapType
*
* @return integer mapType
*/
public function getMapType()
{
return self::MAP_TYPE_INVALID;
}
/**
* Returns an integer which specifies how many more bytes to read.
*
* A positive integer indicates the number of more bytes to fetch before invoking
* this method again.
* A value of zero means this is already a valid character.
* A value of -1 means this cannot possibly be a valid character.
*
* @param string $bytes
* @param integer $size
*
* @return integer
*/
public function validateByteSequence($bytes, $size)
{
$byte = reset($bytes);
if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) {
return 0;
} else {
return -1;
}
}
/**
* Returns the number of bytes which should be read to start each character.
*
* @return integer
*/
public function getInitialByteSize()
{
return 1;
}
}

181
public_html/lib/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php

@ -0,0 +1,181 @@
<?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.
*/
/**
* Analyzes UTF-8 characters.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
* @author Xavier De Cock <xdecock@gmail.com>
*/
class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader
{
/** Pre-computed for optimization */
private static $length_map=array(
//N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x0N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x1N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x2N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x3N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x4N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x5N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x6N
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x7N
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x8N
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x9N
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xAN
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xBN
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xCN
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xDN
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, //0xEN
4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0 //0xFN
);
private static $s_length_map=array(
"\x00"=>1, "\x01"=>1, "\x02"=>1, "\x03"=>1, "\x04"=>1, "\x05"=>1, "\x06"=>1, "\x07"=>1,
"\x08"=>1, "\x09"=>1, "\x0a"=>1, "\x0b"=>1, "\x0c"=>1, "\x0d"=>1, "\x0e"=>1, "\x0f"=>1,
"\x10"=>1, "\x11"=>1, "\x12"=>1, "\x13"=>1, "\x14"=>1, "\x15"=>1, "\x16"=>1, "\x17"=>1,
"\x18"=>1, "\x19"=>1, "\x1a"=>1, "\x1b"=>1, "\x1c"=>1, "\x1d"=>1, "\x1e"=>1, "\x1f"=>1,
"\x20"=>1, "\x21"=>1, "\x22"=>1, "\x23"=>1, "\x24"=>1, "\x25"=>1, "\x26"=>1, "\x27"=>1,
"\x28"=>1, "\x29"=>1, "\x2a"=>1, "\x2b"=>1, "\x2c"=>1, "\x2d"=>1, "\x2e"=>1, "\x2f"=>1,
"\x30"=>1, "\x31"=>1, "\x32"=>1, "\x33"=>1, "\x34"=>1, "\x35"=>1, "\x36"=>1, "\x37"=>1,
"\x38"=>1, "\x39"=>1, "\x3a"=>1, "\x3b"=>1, "\x3c"=>1, "\x3d"=>1, "\x3e"=>1, "\x3f"=>1,
"\x40"=>1, "\x41"=>1, "\x42"=>1, "\x43"=>1, "\x44"=>1, "\x45"=>1, "\x46"=>1, "\x47"=>1,
"\x48"=>1, "\x49"=>1, "\x4a"=>1, "\x4b"=>1, "\x4c"=>1, "\x4d"=>1, "\x4e"=>1, "\x4f"=>1,
"\x50"=>1, "\x51"=>1, "\x52"=>1, "\x53"=>1, "\x54"=>1, "\x55"=>1, "\x56"=>1, "\x57"=>1,
"\x58"=>1, "\x59"=>1, "\x5a"=>1, "\x5b"=>1, "\x5c"=>1, "\x5d"=>1, "\x5e"=>1, "\x5f"=>1,
"\x60"=>1, "\x61"=>1, "\x62"=>1, "\x63"=>1, "\x64"=>1, "\x65"=>1, "\x66"=>1, "\x67"=>1,
"\x68"=>1, "\x69"=>1, "\x6a"=>1, "\x6b"=>1, "\x6c"=>1, "\x6d"=>1, "\x6e"=>1, "\x6f"=>1,
"\x70"=>1, "\x71"=>1, "\x72"=>1, "\x73"=>1, "\x74"=>1, "\x75"=>1, "\x76"=>1, "\x77"=>1,
"\x78"=>1, "\x79"=>1, "\x7a"=>1, "\x7b"=>1, "\x7c"=>1, "\x7d"=>1, "\x7e"=>1, "\x7f"=>1,
"\x80"=>0, "\x81"=>0, "\x82"=>0, "\x83"=>0, "\x84"=>0, "\x85"=>0, "\x86"=>0, "\x87"=>0,
"\x88"=>0, "\x89"=>0, "\x8a"=>0, "\x8b"=>0, "\x8c"=>0, "\x8d"=>0, "\x8e"=>0, "\x8f"=>0,
"\x90"=>0, "\x91"=>0, "\x92"=>0, "\x93"=>0, "\x94"=>0, "\x95"=>0, "\x96"=>0, "\x97"=>0,
"\x98"=>0, "\x99"=>0, "\x9a"=>0, "\x9b"=>0, "\x9c"=>0, "\x9d"=>0, "\x9e"=>0, "\x9f"=>0,
"\xa0"=>0, "\xa1"=>0, "\xa2"=>0, "\xa3"=>0, "\xa4"=>0, "\xa5"=>0, "\xa6"=>0, "\xa7"=>0,
"\xa8"=>0, "\xa9"=>0, "\xaa"=>0, "\xab"=>0, "\xac"=>0, "\xad"=>0, "\xae"=>0, "\xaf"=>0,
"\xb0"=>0, "\xb1"=>0, "\xb2"=>0, "\xb3"=>0, "\xb4"=>0, "\xb5"=>0, "\xb6"=>0, "\xb7"=>0,
"\xb8"=>0, "\xb9"=>0, "\xba"=>0, "\xbb"=>0, "\xbc"=>0, "\xbd"=>0, "\xbe"=>0, "\xbf"=>0,
"\xc0"=>2, "\xc1"=>2, "\xc2"=>2, "\xc3"=>2, "\xc4"=>2, "\xc5"=>2, "\xc6"=>2, "\xc7"=>2,
"\xc8"=>2, "\xc9"=>2, "\xca"=>2, "\xcb"=>2, "\xcc"=>2, "\xcd"=>2, "\xce"=>2, "\xcf"=>2,
"\xd0"=>2, "\xd1"=>2, "\xd2"=>2, "\xd3"=>2, "\xd4"=>2, "\xd5"=>2, "\xd6"=>2, "\xd7"=>2,
"\xd8"=>2, "\xd9"=>2, "\xda"=>2, "\xdb"=>2, "\xdc"=>2, "\xdd"=>2, "\xde"=>2, "\xdf"=>2,
"\xe0"=>3, "\xe1"=>3, "\xe2"=>3, "\xe3"=>3, "\xe4"=>3, "\xe5"=>3, "\xe6"=>3, "\xe7"=>3,
"\xe8"=>3, "\xe9"=>3, "\xea"=>3, "\xeb"=>3, "\xec"=>3, "\xed"=>3, "\xee"=>3, "\xef"=>3,
"\xf0"=>4, "\xf1"=>4, "\xf2"=>4, "\xf3"=>4, "\xf4"=>4, "\xf5"=>4, "\xf6"=>4, "\xf7"=>4,
"\xf8"=>5, "\xf9"=>5, "\xfa"=>5, "\xfb"=>5, "\xfc"=>6, "\xfd"=>6, "\xfe"=>0, "\xff"=>0,
);
/**
* Returns the complete character map.
*
* @param string $string
* @param integer $startOffset
* @param array $currentMap
* @param mixed $ignoredChars
*
* @return integer
*/
public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars)
{
if (!isset($currentMap['i']) || ! isset($currentMap['p'])) {
$currentMap['p'] = $currentMap['i'] = array();
}
$strlen=strlen($string);
$charPos=count($currentMap['p']);
$foundChars=0;
$invalid=false;
for ($i = 0; $i < $strlen; ++$i) {
$char = $string[$i];
$size = self::$s_length_map[$char];
if ($size == 0) {
/* char is invalid, we must wait for a resync */
$invalid = true;
continue;
} else {
if ($invalid == true) {
/* We mark the chars as invalid and start a new char */
$currentMap['p'][$charPos + $foundChars] = $startOffset + $i;
$currentMap['i'][$charPos + $foundChars] = true;
++$foundChars;
$invalid = false;
}
if (($i + $size) > $strlen) {
$ignoredChars = substr($string, $i);
break;
}
for ($j = 1; $j < $size; ++$j) {
$char = $string[$i + $j];
if ($char > "\x7F" && $char < "\xC0") {
// Valid - continue parsing
} else {
/* char is invalid, we must wait for a resync */
$invalid = true;
continue 2;
}
}
/* Ok we got a complete char here */
$currentMap['p'][$charPos + $foundChars] = $startOffset + $i + $size;
$i += $j - 1;
++$foundChars;
}
}
return $foundChars;
}
/**
* Returns mapType.
*
* @return integer mapType
*/
public function getMapType()
{
return self::MAP_TYPE_POSITIONS;
}
/**
* Returns an integer which specifies how many more bytes to read.
*
* A positive integer indicates the number of more bytes to fetch before invoking
* this method again.
* A value of zero means this is already a valid character.
* A value of -1 means this cannot possibly be a valid character.
*
* @param string $bytes
* @param integer $size
*
* @return integer
*/
public function validateByteSequence($bytes, $size)
{
if ($size<1) {
return -1;
}
$needed = self::$length_map[$bytes[0]] - $size;
return ($needed > -1)
? $needed
: -1
;
}
/**
* Returns the number of bytes which should be read to start each character.
*
* @return integer
*/
public function getInitialByteSize()
{
return 1;
}
}

28
public_html/lib/swiftmailer/classes/Swift/CharacterReaderFactory.php

@ -0,0 +1,28 @@
<?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.
*/
/**
* A factory for creating CharacterReaders.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
*/
interface Swift_CharacterReaderFactory
{
/**
* Returns a CharacterReader suitable for the charset applied.
*
* @param string $charset
*
* @return Swift_CharacterReader
*/
public function getReaderFor($charset);
}

126
public_html/lib/swiftmailer/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php

@ -0,0 +1,126 @@
<?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.
*/
/**
* Standard factory for creating CharacterReaders.
*
* @package Swift
* @subpackage Encoder
* @author Chris Corbyn
*/
class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory implements Swift_CharacterReaderFactory
{
/**
* A map of charset patterns to their implementation classes.
*
* @var array
*/
private static $_map = array();
/**
* Factories which have already been loaded.
*
* @var Swift_CharacterReaderFactory[]
*/
private static $_loaded = array();
/**
* Creates a new CharacterReaderFactory.
*/
public function __construct()
{
$this->init();
}
public function __wakeup()
{
$this->init();
}
public function init()
{
if (count(self::$_map) > 0) {
return;
}
$prefix = 'Swift_CharacterReader_';
$singleByte = array(
'class' => $prefix . 'GenericFixedWidthReader',
'constructor' => array(1)
);
$doubleByte = array(
'class' => $prefix . 'GenericFixedWidthReader',
'constructor' => array(2)
);
$fourBytes = array(
'class' => $prefix . 'GenericFixedWidthReader',
'constructor' => array(4)
);
//Utf-8
self::$_map['utf-?8'] = array(
'class' => $prefix . 'Utf8Reader',
'constructor' => array()
);
//7-8 bit charsets
self::$_map['(us-)?ascii'] = $singleByte;
self::$_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte;
self::$_map['windows-?125[0-9]'] = $singleByte;
self::$_map['cp-?[0-9]+'] = $singleByte;
self::$_map['ansi'] = $singleByte;
self::$_map['macintosh'] = $singleByte;
self::$_map['koi-?7'] = $singleByte;
self::$_map['koi-?8-?.+'] = $singleByte;
self::$_map['mik'] = $singleByte;
self::$_map['(cork|t1)'] = $singleByte;
self::$_map['v?iscii'] = $singleByte;
//16 bits
self::$_map['(ucs-?2|utf-?16)'] = $doubleByte;
//32 bits
self::$_map['(ucs-?4|utf-?32)'] = $fourBytes;
//Fallback
self::$_map['.*'] = $singleByte;
}
/**
* Returns a CharacterReader suitable for the charset applied.
*
* @param string $charset
*
* @return Swift_CharacterReader
*/
public function getReaderFor($charset)
{
$charset = trim(strtolower($charset));
foreach (self::$_map as $pattern => $spec) {
$re = '/^' . $pattern . '$/D';
if (preg_match($re, $charset)) {
if (!array_key_exists($pattern, self::$_loaded)) {
$reflector = new ReflectionClass($spec['class']);
if ($reflector->getConstructor()) {
$reader = $reflector->newInstanceArgs($spec['constructor']);
} else {
$reader = $reflector->newInstance();
}
self::$_loaded[$pattern] = $reader;
}
return self::$_loaded[$pattern];
}
}
}
}

91
public_html/lib/swiftmailer/classes/Swift/CharacterStream.php

@ -0,0 +1,91 @@
<?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 reading and writing data in terms of characters as opposed
* to bytes.
*
* Classes implementing this interface may use a subsystem which requires less
* memory than working with large strings of data.
*
* @package Swift
* @subpackage CharacterStream
* @author Chris Corbyn
*/
interface Swift_CharacterStream
{
/**
* Set the character set used in this CharacterStream.
*
* @param string $charset
*/
public function setCharacterSet($charset);
/**
* Set the CharacterReaderFactory for multi charset support.
*
* @param Swift_CharacterReaderFactory $factory
*/
public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory);
/**
* Overwrite this character stream using the byte sequence in the byte stream.
*
* @param Swift_OutputByteStream $os output stream to read from
*/
public function importByteStream(Swift_OutputByteStream $os);
/**
* Import a string a bytes into this CharacterStream, overwriting any existing
* data in the stream.
*
* @param string $string
*/
public function importString($string);
/**
* Read $length characters from the stream and move the internal pointer
* $length further into the stream.
*
* @param integer $length
*
* @return string
*/
public function read($length);
/**
* Read $length characters from the stream and return a 1-dimensional array
* containing there octet values.
*
* @param integer $length
*
* @return int[]
*/
public function readBytes($length);
/**
* Write $chars to the end of the stream.
*
* @param string $chars
*/
public function write($chars);
/**
* Move the internal pointer to $charOffset in the stream.
*
* @param integer $charOffset
*/
public function setPointer($charOffset);
/**
* Empty the stream and reset the internal pointer.
*/
public function flushContents();
}

296
public_html/lib/swiftmailer/classes/Swift/CharacterStream/ArrayCharacterStream.php

@ -0,0 +1,296 @@
<?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.
*/
/**
* A CharacterStream implementation which stores characters in an internal array.
*
* @package Swift
* @subpackage CharacterStream
* @author Chris Corbyn
*/
class Swift_CharacterStream_ArrayCharacterStream implements Swift_CharacterStream
{
/** A map of byte values and their respective characters */
private static $_charMap;