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 * @return Swift_Preferences */ 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; } }