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: /**
12: * Provides quick access to each encoding type.
13: *
14: * @package Swift
15: * @subpackage Encoder
16: * @author Chris Corbyn
17: */
18: class Swift_Encoding
19: {
20: /**
21: * Get the Encoder that provides 7-bit encoding.
22: *
23: * @return Swift_Mime_ContentEncoder
24: */
25: public static function get7BitEncoding()
26: {
27: return self::_lookup('mime.7bitcontentencoder');
28: }
29:
30: /**
31: * Get the Encoder that provides 8-bit encoding.
32: *
33: * @return Swift_Mime_ContentEncoder
34: */
35: public static function get8BitEncoding()
36: {
37: return self::_lookup('mime.8bitcontentencoder');
38: }
39:
40: /**
41: * Get the Encoder that provides Quoted-Printable (QP) encoding.
42: *
43: * @return Swift_Mime_ContentEncoder
44: */
45: public static function getQpEncoding()
46: {
47: return self::_lookup('mime.qpcontentencoder');
48: }
49:
50: /**
51: * Get the Encoder that provides Base64 encoding.
52: *
53: * @return Swift_Mime_ContentEncoder
54: */
55: public static function getBase64Encoding()
56: {
57: return self::_lookup('mime.base64contentencoder');
58: }
59:
60: // -- Private Static Methods
61:
62: private static function _lookup($key)
63: {
64: return Swift_DependencyContainer::getInstance()->lookup($key);
65: }
66: }
67: