public function __construct(array $params) { parent::__construct($params); if (isset($params['allowedtags'])) { $this->allowedTags = $params['allowedtags']; } $this->processParts($this); }
/** * 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); } }
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(); } }
/** * {@inheritdoc} */ public function __construct(array $params) { parent::__construct($params); }