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; } }