XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Preferences.php
Go to the documentation of this file.
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 
19 {
20 
22  private static $_instance = null;
23 
25  private function __construct() { }
26 
31  public static function getInstance()
32  {
33  if (!isset(self::$_instance))
34  {
35  self::$_instance = new self();
36  }
37  return self::$_instance;
38  }
39 
45  public function setCharset($charset)
46  {
48  ->register('properties.charset')->asValue($charset);
49  return $this;
50  }
51 
57  public function setTempDir($dir)
58  {
60  ->register('tempdir')->asValue($dir);
61  return $this;
62  }
63 
69  public function setCacheType($type)
70  {
72  ->register('cache')->asAliasOf(sprintf('cache.%s', $type));
73  return $this;
74  }
75 
76 }