register('properties.charset')->asValue($charset); return $this; } /** * Set the directory where temporary files can be saved. * * @param string $dir * * @return $this */ 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 $this */ public function setCacheType($type) { Swift_DependencyContainer::getInstance()->register('cache')->asAliasOf(sprintf('cache.%s', $type)); return $this; } /** * Set the QuotedPrintable dot escaper preference. * * @param bool $dotEscape * * @return $this */ public function setQPDotEscape($dotEscape) { $dotEscape = !empty($dotEscape); Swift_DependencyContainer::getInstance() ->register('mime.qpcontentencoder') ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') ->withDependencies(['mime.charstream', 'mime.bytecanonicalizer']) ->addConstructorValue($dotEscape); return $this; } }