Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 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_once dirname(__FILE__) . '/../HeaderEncoder.php';
12: require_once dirname(__FILE__) . '/../../Encoder/Base64Encoder.php';
13: 
14: /**
15:  * Handles Base64 (B) Header Encoding in Swift Mailer.
16:  * @package Swift
17:  * @subpackage Mime
18:  * @author Chris Corbyn
19:  */
20: class Swift_Mime_HeaderEncoder_Base64HeaderEncoder extends Swift_Encoder_Base64Encoder implements Swift_Mime_HeaderEncoder
21: {
22:     /**
23:      * Get the name of this encoding scheme.
24:      * Returns the string 'B'.
25:      * @return string
26:      */
27:     public function getName()
28:     {
29:         return 'B';
30:     }
31: 
32:     /**
33:      * Takes an unencoded string and produces a Base64 encoded string from it.
34:      * If the charset is iso-2022-jp, it uses mb_encode_mimeheader instead of
35:      * default encodeString, otherwise pass to the parent method.
36:      * @param  string $string          to encode
37:      * @param  int    $firstLineOffset
38:      * @param  int    $maxLineLength,  optional, 0 indicates the default of 76 bytes
39:      * @param  string $charset
40:      * @return string
41:      */
42:     public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0, $charset = 'utf-8')
43:     {
44:         if (strtolower($charset) === 'iso-2022-jp') {
45:             $old = mb_internal_encoding();
46:             mb_internal_encoding('utf-8');
47:             $newstring = mb_encode_mimeheader($string, $charset, $this->getName(), "\r\n");
48:             mb_internal_encoding($old);
49: 
50:             return $newstring;
51:         }
52: 
53:         return parent::encodeString($string, $firstLineOffset, $maxLineLength);
54:     }
55: }
56: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen