2
0
forked from Wavyzz/dolibarr

swiftmailer

This commit is contained in:
Frédéric FRANCE
2018-01-21 15:55:56 +01:00
parent 3a8ceb130f
commit a34b99f3ec
191 changed files with 5164 additions and 4074 deletions

View File

@@ -16,7 +16,7 @@
class Swift_Preferences
{
/** Singleton instance */
private static $_instance = null;
private static $instance = null;
/** Constructor not to be used */
private function __construct()
@@ -26,15 +26,15 @@ class Swift_Preferences
/**
* Gets the instance of Preferences.
*
* @return Swift_Preferences
* @return self
*/
public static function getInstance()
{
if (!isset(self::$_instance)) {
self::$_instance = new self();
if (!isset(self::$instance)) {
self::$instance = new self();
}
return self::$_instance;
return self::$instance;
}
/**
@@ -42,12 +42,11 @@ class Swift_Preferences
*
* @param string $charset
*
* @return Swift_Preferences
* @return $this
*/
public function setCharset($charset)
{
Swift_DependencyContainer::getInstance()
->register('properties.charset')->asValue($charset);
Swift_DependencyContainer::getInstance()->register('properties.charset')->asValue($charset);
return $this;
}
@@ -57,12 +56,11 @@ class Swift_Preferences
*
* @param string $dir
*
* @return Swift_Preferences
* @return $this
*/
public function setTempDir($dir)
{
Swift_DependencyContainer::getInstance()
->register('tempdir')->asValue($dir);
Swift_DependencyContainer::getInstance()->register('tempdir')->asValue($dir);
return $this;
}
@@ -72,12 +70,11 @@ class Swift_Preferences
*
* @param string $type
*
* @return Swift_Preferences
* @return $this
*/
public function setCacheType($type)
{
Swift_DependencyContainer::getInstance()
->register('cache')->asAliasOf(sprintf('cache.%s', $type));
Swift_DependencyContainer::getInstance()->register('cache')->asAliasOf(sprintf('cache.%s', $type));
return $this;
}
@@ -87,7 +84,7 @@ class Swift_Preferences
*
* @param bool $dotEscape
*
* @return Swift_Preferences
* @return $this
*/
public function setQPDotEscape($dotEscape)
{