mime_deps.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. require dirname(__FILE__) . '/../mime_types.php';
  3. Swift_DependencyContainer::getInstance()
  4. -> register('properties.charset')
  5. -> asValue('utf-8')
  6. -> register('mime.grammar')
  7. -> asSharedInstanceOf('Swift_Mime_Grammar')
  8. -> register('mime.message')
  9. -> asNewInstanceOf('Swift_Mime_SimpleMessage')
  10. -> withDependencies(array(
  11. 'mime.headerset',
  12. 'mime.qpcontentencoder',
  13. 'cache',
  14. 'mime.grammar',
  15. 'properties.charset'
  16. ))
  17. -> register('mime.part')
  18. -> asNewInstanceOf('Swift_Mime_MimePart')
  19. -> withDependencies(array(
  20. 'mime.headerset',
  21. 'mime.qpcontentencoder',
  22. 'cache',
  23. 'mime.grammar',
  24. 'properties.charset'
  25. ))
  26. -> register('mime.attachment')
  27. -> asNewInstanceOf('Swift_Mime_Attachment')
  28. -> withDependencies(array(
  29. 'mime.headerset',
  30. 'mime.base64contentencoder',
  31. 'cache',
  32. 'mime.grammar'
  33. ))
  34. -> addConstructorValue($swift_mime_types)
  35. -> register('mime.embeddedfile')
  36. -> asNewInstanceOf('Swift_Mime_EmbeddedFile')
  37. -> withDependencies(array(
  38. 'mime.headerset',
  39. 'mime.base64contentencoder',
  40. 'cache',
  41. 'mime.grammar'
  42. ))
  43. -> addConstructorValue($swift_mime_types)
  44. -> register('mime.headerfactory')
  45. -> asNewInstanceOf('Swift_Mime_SimpleHeaderFactory')
  46. -> withDependencies(array(
  47. 'mime.qpheaderencoder',
  48. 'mime.rfc2231encoder',
  49. 'mime.grammar',
  50. 'properties.charset'
  51. ))
  52. -> register('mime.headerset')
  53. -> asNewInstanceOf('Swift_Mime_SimpleHeaderSet')
  54. -> withDependencies(array('mime.headerfactory', 'properties.charset'))
  55. -> register('mime.qpheaderencoder')
  56. -> asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder')
  57. -> withDependencies(array('mime.charstream'))
  58. -> register('mime.charstream')
  59. -> asNewInstanceOf('Swift_CharacterStream_NgCharacterStream')
  60. -> withDependencies(array('mime.characterreaderfactory', 'properties.charset'))
  61. -> register('mime.bytecanonicalizer')
  62. -> asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter')
  63. -> addConstructorValue(array(array(0x0D, 0x0A), array(0x0D), array(0x0A)))
  64. -> addConstructorValue(array(array(0x0A), array(0x0A), array(0x0D, 0x0A)))
  65. -> register('mime.characterreaderfactory')
  66. -> asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory')
  67. -> register('mime.qpcontentencoder')
  68. -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder')
  69. -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer'))
  70. -> register('mime.7bitcontentencoder')
  71. -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder')
  72. -> addConstructorValue('7bit')
  73. -> addConstructorValue(true)
  74. -> register('mime.8bitcontentencoder')
  75. -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder')
  76. -> addConstructorValue('8bit')
  77. -> addConstructorValue(true)
  78. -> register('mime.base64contentencoder')
  79. -> asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder')
  80. -> register('mime.rfc2231encoder')
  81. -> asNewInstanceOf('Swift_Encoder_Rfc2231Encoder')
  82. -> withDependencies(array('mime.charstream'))
  83. ;
  84. unset($swift_mime_types);