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: /**
12:  * Changes some global preference settings in Swift Mailer.
13:  * @package Swift
14:  * @author Chris Corbyn
15:  */
16: class Swift_Preferences
17: {
18:     /** Singleton instance */
19:     private static $_instance = null;
20: 
21:     /** Constructor not to be used */
22:     private function __construct() { }
23: 
24:     /**
25:      * Get a new instance of Preferences.
26:      * @return Swift_Preferences
27:      */
28:     public static function getInstance()
29:     {
30:         if (!isset(self::$_instance)) {
31:             self::$_instance = new self();
32:         }
33: 
34:         return self::$_instance;
35:     }
36: 
37:     /**
38:      * Set the default charset used.
39:      * @param string
40:      * @return Swift_Preferences
41:      */
42:     public function setCharset($charset)
43:     {
44:         Swift_DependencyContainer::getInstance()
45:             ->register('properties.charset')->asValue($charset);
46: 
47:         return $this;
48:     }
49: 
50:     /**
51:      * Set the directory where temporary files can be saved.
52:      * @param  string            $dir
53:      * @return Swift_Preferences
54:      */
55:     public function setTempDir($dir)
56:     {
57:         Swift_DependencyContainer::getInstance()
58:             ->register('tempdir')->asValue($dir);
59: 
60:         return $this;
61:     }
62: 
63:     /**
64:      * Set the type of cache to use (i.e. "disk" or "array").
65:      * @param  string            $type
66:      * @return Swift_Preferences
67:      */
68:     public function setCacheType($type)
69:     {
70:         Swift_DependencyContainer::getInstance()
71:             ->register('cache')->asAliasOf(sprintf('cache.%s', $type));
72: 
73:         return $this;
74:     }
75: 
76:     /**
77:      * Add the
78:      * @param  boolean           $dotEscape
79:      * @return Swift_Preferences
80:      */
81:     public function setQPDotEscape($dotEscape)
82:     {
83:         $dotEscape=!empty($dotEscape);
84:         Swift_DependencyContainer::getInstance()
85:             -> register('mime.qpcontentencoder')
86:             -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder')
87:             -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer'))
88:             -> addConstructorValue($dotEscape);
89: 
90:         return $this;
91:     }
92: }
93: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen