|
TYPO3 API
SVNRelease
|
00001 <?php 00002 00003 /* 00004 * This file is part of SwiftMailer. 00005 * (c) 2004-2009 Chris Corbyn 00006 * 00007 * For the full copyright and license information, please view the LICENSE 00008 * file that was distributed with this source code. 00009 */ 00010 00011 //@require 'Swift/DependencyContainer.php'; 00012 00013 /** 00014 * Provides quick access to each encoding type. 00015 * 00016 * @package Swift 00017 * @subpackage Encoder 00018 * @author Chris Corbyn 00019 */ 00020 class Swift_Encoding 00021 { 00022 00023 /** 00024 * Get the Encoder that provides 7-bit encoding. 00025 * 00026 * @return Swift_Mime_ContentEncoder 00027 */ 00028 public static function get7BitEncoding() 00029 { 00030 return self::_lookup('mime.7bitcontentencoder'); 00031 } 00032 00033 /** 00034 * Get the Encoder that provides 8-bit encoding. 00035 * 00036 * @return Swift_Mime_ContentEncoder 00037 */ 00038 public static function get8BitEncoding() 00039 { 00040 return self::_lookup('mime.8bitcontentencoder'); 00041 } 00042 00043 /** 00044 * Get the Encoder that provides Quoted-Printable (QP) encoding. 00045 * 00046 * @return Swift_Mime_ContentEncoder 00047 */ 00048 public static function getQpEncoding() 00049 { 00050 return self::_lookup('mime.qpcontentencoder'); 00051 } 00052 00053 /** 00054 * Get the Encoder that provides Base64 encoding. 00055 * 00056 * @return Swift_Mime_ContentEncoder 00057 */ 00058 public static function getBase64Encoding() 00059 { 00060 return self::_lookup('mime.base64contentencoder'); 00061 } 00062 00063 // -- Private Static Methods 00064 00065 private static function _lookup($key) 00066 { 00067 return Swift_DependencyContainer::getInstance()->lookup($key); 00068 } 00069 00070 }
1.8.0