Exemplo n.º 1
0
 public function __construct(array $params)
 {
     parent::__construct($params);
     if (isset($params['allowedtags'])) {
         $this->allowedTags = $params['allowedtags'];
     }
     $this->processParts($this);
 }
Exemplo n.º 2
0
 /**
  * Public constructor
  *
  * @param array $params
  */
 public function __construct(array $params)
 {
     parent::__construct($params);
     // do not do this for "child" messages (attachments)
     if (!empty($params['root'])) {
         $helper = new SanitizeHeaders();
         $helper($this);
     }
 }
Exemplo n.º 3
0
 public function __construct(array $params)
 {
     parent::__construct($params);
     if (!$this->isMultipart()) {
         return;
     }
     for ($counter = 1; $counter <= $this->countParts(); ++$counter) {
         $part = $this->getPart($counter);
         $partHeaders = $part->getHeaders();
         $partHeaders->getPluginClassLoader()->registerPlugin('contentdisposition', ContentDisposition::class);
         if (!$partHeaders->has('content-disposition')) {
             continue;
         }
         /** @var ContentDisposition $header */
         $header = $part->getHeader('content-disposition');
         $type = $header->getDisposition();
         if (empty($type) || $type != 'attachment') {
             continue;
         }
         $this->attachments[$header->getParameter('filename')] = $part->getContent();
     }
 }
Exemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $params)
 {
     parent::__construct($params);
 }