[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/dependency_maps/ -> mime_deps.php (source)

   1  <?php
   2  
   3  require  __DIR__.'/../mime_types.php';
   4  
   5  Swift_DependencyContainer::getInstance()
   6      ->register('properties.charset')
   7      ->asValue('utf-8')
   8  
   9      ->register('email.validator')
  10      ->asSharedInstanceOf('Egulias\EmailValidator\EmailValidator')
  11  
  12      ->register('mime.idgenerator.idright')
  13      // As SERVER_NAME can come from the user in certain configurations, check that
  14      // it does not contain forbidden characters (see RFC 952 and RFC 2181). Use
  15      // preg_replace() instead of preg_match() to prevent DoS attacks with long host names.
  16      ->asValue(!empty($_SERVER['SERVER_NAME']) && '' === preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated')
  17  
  18      ->register('mime.idgenerator')
  19      ->asSharedInstanceOf('Swift_Mime_IdGenerator')
  20      ->withDependencies([
  21          'mime.idgenerator.idright',
  22      ])
  23  
  24      ->register('mime.message')
  25      ->asNewInstanceOf('Swift_Mime_SimpleMessage')
  26      ->withDependencies([
  27          'mime.headerset',
  28          'mime.textcontentencoder',
  29          'cache',
  30          'mime.idgenerator',
  31          'properties.charset',
  32      ])
  33  
  34      ->register('mime.part')
  35      ->asNewInstanceOf('Swift_Mime_MimePart')
  36      ->withDependencies([
  37          'mime.headerset',
  38          'mime.textcontentencoder',
  39          'cache',
  40          'mime.idgenerator',
  41          'properties.charset',
  42      ])
  43  
  44      ->register('mime.attachment')
  45      ->asNewInstanceOf('Swift_Mime_Attachment')
  46      ->withDependencies([
  47          'mime.headerset',
  48          'mime.base64contentencoder',
  49          'cache',
  50          'mime.idgenerator',
  51      ])
  52      ->addConstructorValue($swift_mime_types)
  53  
  54      ->register('mime.embeddedfile')
  55      ->asNewInstanceOf('Swift_Mime_EmbeddedFile')
  56      ->withDependencies([
  57          'mime.headerset',
  58          'mime.base64contentencoder',
  59          'cache',
  60          'mime.idgenerator',
  61      ])
  62      ->addConstructorValue($swift_mime_types)
  63  
  64      ->register('mime.headerfactory')
  65      ->asNewInstanceOf('Swift_Mime_SimpleHeaderFactory')
  66      ->withDependencies([
  67          'mime.qpheaderencoder',
  68          'mime.rfc2231encoder',
  69          'email.validator',
  70          'properties.charset',
  71          'address.' . SWIFT_ADDRESSENCODER . 'addressencoder',
  72      ])
  73  
  74      ->register('mime.headerset')
  75      ->asNewInstanceOf('Swift_Mime_SimpleHeaderSet')
  76      ->withDependencies(['mime.headerfactory', 'properties.charset'])
  77  
  78      ->register('mime.qpheaderencoder')
  79      ->asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder')
  80      ->withDependencies(['mime.charstream'])
  81  
  82      ->register('mime.base64headerencoder')
  83      ->asNewInstanceOf('Swift_Mime_HeaderEncoder_Base64HeaderEncoder')
  84      ->withDependencies(['mime.charstream'])
  85  
  86      ->register('mime.charstream')
  87      ->asNewInstanceOf('Swift_CharacterStream_NgCharacterStream')
  88      ->withDependencies(['mime.characterreaderfactory', 'properties.charset'])
  89  
  90      ->register('mime.bytecanonicalizer')
  91      ->asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter')
  92      ->addConstructorValue([[0x0D, 0x0A], [0x0D], [0x0A]])
  93      ->addConstructorValue([[0x0A], [0x0A], [0x0D, 0x0A]])
  94  
  95      ->register('mime.characterreaderfactory')
  96      ->asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory')
  97  
  98      ->register('mime.textcontentencoder')
  99      ->asAliasOf('mime.qpcontentencoder')
 100  
 101      ->register('mime.safeqpcontentencoder')
 102      ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder')
 103      ->withDependencies(['mime.charstream', 'mime.bytecanonicalizer'])
 104  
 105      ->register('mime.rawcontentencoder')
 106      ->asNewInstanceOf('Swift_Mime_ContentEncoder_RawContentEncoder')
 107  
 108      ->register('mime.nativeqpcontentencoder')
 109      ->withDependencies(['properties.charset'])
 110      ->asNewInstanceOf('Swift_Mime_ContentEncoder_NativeQpContentEncoder')
 111  
 112      ->register('mime.qpcontentencoder')
 113      ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoderProxy')
 114      ->withDependencies(['mime.safeqpcontentencoder', 'mime.nativeqpcontentencoder', 'properties.charset'])
 115  
 116      ->register('mime.7bitcontentencoder')
 117      ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder')
 118      ->addConstructorValue('7bit')
 119      ->addConstructorValue(true)
 120  
 121      ->register('mime.8bitcontentencoder')
 122      ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder')
 123      ->addConstructorValue('8bit')
 124      ->addConstructorValue(true)
 125  
 126      ->register('mime.base64contentencoder')
 127      ->asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder')
 128  
 129      ->register('mime.rfc2231encoder')
 130      ->asNewInstanceOf('Swift_Encoder_Rfc2231Encoder')
 131      ->withDependencies(['mime.charstream'])
 132  ;
 133  
 134  unset($swift_mime_types);


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1