summaryrefslogtreecommitdiff
path: root/vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php')
-rw-r--r--vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php88
1 files changed, 0 insertions, 88 deletions
diff --git a/vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php
deleted file mode 100644
index 8480f99f..00000000
--- a/vendor/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
- */
-
-/**
- * Proxy for quoted-printable content encoders.
- *
- * Switches on the best QP encoder implementation for current charset.
- *
- * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
- */
-class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_ContentEncoder
-{
- /**
- * @var Swift_Mime_ContentEncoder_QpContentEncoder
- */
- private $safeEncoder;
-
- /**
- * @var Swift_Mime_ContentEncoder_NativeQpContentEncoder
- */
- private $nativeEncoder;
-
- /**
- * @var null|string
- */
- private $charset;
-
- /**
- * Constructor.
- *
- * @param Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder
- * @param Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder
- * @param string|null $charset
- */
- public function __construct(Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder, Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder, $charset)
- {
- $this->safeEncoder = $safeEncoder;
- $this->nativeEncoder = $nativeEncoder;
- $this->charset = $charset;
- }
-
- /**
- * {@inheritdoc}
- */
- public function charsetChanged($charset)
- {
- $this->charset = $charset;
- }
-
- /**
- * {@inheritdoc}
- */
- public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
- {
- $this->getEncoder()->encodeByteStream($os, $is, $firstLineOffset, $maxLineLength);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'quoted-printable';
- }
-
- /**
- * {@inheritdoc}
- */
- public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
- {
- return $this->getEncoder()->encodeString($string, $firstLineOffset, $maxLineLength);
- }
-
- /**
- * @return Swift_Mime_ContentEncoder
- */
- private function getEncoder()
- {
- return 'utf-8' === $this->charset ? $this->nativeEncoder : $this->safeEncoder;
- }
-}