diff -r 000000000000 -r 7f95f8617b0b vendor/swiftmailer/lib/classes/Swift/Preferences.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/swiftmailer/lib/classes/Swift/Preferences.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,90 @@ +register('properties.charset')->asValue($charset); + return $this; + } + + /** + * Set the directory where temporary files can be saved. + * @param string $dir + * @return Swift_Preferences + */ + public function setTempDir($dir) + { + Swift_DependencyContainer::getInstance() + ->register('tempdir')->asValue($dir); + return $this; + } + + /** + * Set the type of cache to use (i.e. "disk" or "array"). + * @param string $type + * @return Swift_Preferences + */ + public function setCacheType($type) + { + Swift_DependencyContainer::getInstance() + ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); + return $this; + } + + /** + * Add the + * @param boolean $dotEscape + */ + public function setQPDotEscape($dotEscape) + { + $dotEscape=!empty($dotEscape); + Swift_DependencyContainer::getInstance() + -> register('mime.qpcontentencoder') + -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) + -> addConstructorValue($dotEscape); + return $this; + } + +}