Added feature #15998: Create a new API to send mails based on SwiftMailer to replace...
[Packages/TYPO3.CMS.git] / typo3 / contrib / swiftmailer / classes / Swift / Encoding.php
1 <?php
2
3 /*
4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11 //@require 'Swift/DependencyContainer.php';
12
13 /**
14 * Provides quick access to each encoding type.
15 *
16 * @package Swift
17 * @subpackage Encoder
18 * @author Chris Corbyn
19 */
20 class Swift_Encoding
21 {
22
23 /**
24 * Get the Encoder that provides 7-bit encoding.
25 *
26 * @return Swift_Mime_ContentEncoder
27 */
28 public static function get7BitEncoding()
29 {
30 return self::_lookup('mime.7bitcontentencoder');
31 }
32
33 /**
34 * Get the Encoder that provides 8-bit encoding.
35 *
36 * @return Swift_Mime_ContentEncoder
37 */
38 public static function get8BitEncoding()
39 {
40 return self::_lookup('mime.8bitcontentencoder');
41 }
42
43 /**
44 * Get the Encoder that provides Quoted-Printable (QP) encoding.
45 *
46 * @return Swift_Mime_ContentEncoder
47 */
48 public static function getQpEncoding()
49 {
50 return self::_lookup('mime.qpcontentencoder');
51 }
52
53 /**
54 * Get the Encoder that provides Base64 encoding.
55 *
56 * @return Swift_Mime_ContentEncoder
57 */
58 public static function getBase64Encoding()
59 {
60 return self::_lookup('mime.base64contentencoder');
61 }
62
63 // -- Private Static Methods
64
65 private static function _lookup($key)
66 {
67 return Swift_DependencyContainer::getInstance()->lookup($key);
68 }
69
70 }