mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Bump php-mime-mail-parser library to 9.0.1
This commit is contained in:
@@ -74,7 +74,7 @@ class Parser
|
||||
*
|
||||
* @param CharsetManager|null $charset
|
||||
*/
|
||||
public function __construct(CharsetManager $charset = null)
|
||||
public function __construct(?CharsetManager $charset = null)
|
||||
{
|
||||
if ($charset == null) {
|
||||
$charset = new Charset();
|
||||
@@ -208,6 +208,11 @@ class Parser
|
||||
*/
|
||||
protected function parse()
|
||||
{
|
||||
if (!$this->resource) {
|
||||
throw new Exception(
|
||||
'MIME message cannot be parsed'
|
||||
);
|
||||
}
|
||||
$structure = mailparse_msg_get_structure($this->resource);
|
||||
$this->parts = [];
|
||||
foreach ($structure as $part_id) {
|
||||
@@ -404,7 +409,7 @@ class Parser
|
||||
$body = empty($inline_parts) ? '' : $inline_parts[0];
|
||||
} else {
|
||||
throw new Exception(
|
||||
'Invalid type specified for getMessageBody(). Expected: text, html or htmlEmbeded.'
|
||||
'Invalid type specified for getMessageBody(). Expected: text, html or htmlEmbedded.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -450,7 +455,7 @@ class Parser
|
||||
*
|
||||
* @param string $name Header name (case-insensitive)
|
||||
*
|
||||
* @return array
|
||||
* @return array<int, array{'display': string, 'address': string, 'is_group': bool}>
|
||||
*/
|
||||
public function getAddresses($name)
|
||||
{
|
||||
@@ -464,9 +469,9 @@ class Parser
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the attachments contents in order of appearance
|
||||
* Returns the inline parts contents (text or HTML)
|
||||
*
|
||||
* @return Attachment[]
|
||||
* @return string[] The decoded inline parts.
|
||||
*/
|
||||
public function getInlineParts($type = 'text')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user