/framework/vendor/swift/lib/preferences.php

http://zoop.googlecode.com/ · PHP · 20 lines · 8 code · 3 blank · 9 comment · 2 complexity · b701332b421b0c289a5559729e922f7b MD5 · raw file

  1. <?php
  2. /****************************************************************************/
  3. /* */
  4. /* YOU MAY WISH TO MODIFY OR REMOVE THE FOLLOWING LINES WHICH SET DEFAULTS */
  5. /* */
  6. /****************************************************************************/
  7. // Sets the default charset so that setCharset() is not needed elsewhere
  8. Swift_Preferences::getInstance()->setCharset('utf-8');
  9. // Without these lines the default caching mechanism is "array" but this uses
  10. // a lot of memory.
  11. // If possible, use a disk cache to enable attaching large attachments etc
  12. if (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()))
  13. {
  14. Swift_Preferences::getInstance()
  15. -> setTempDir(sys_get_temp_dir())
  16. -> setCacheType('disk');
  17. }