Skip to content

Commit

Permalink
feature #49824 [Mime] Added getDispostion() to TextPart to get curren…
Browse files Browse the repository at this point in the history
…t content disposition. (Cyb0rk)

This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

[Mime] Added getDispostion() to TextPart to get current content disposition.

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Added getDispostion() in TextPart to get current content disposition.
It would be nice to get the current content disposition in TextPart. This is needed to determine if an attachment is inline or not.

Commits
-------

09f0049 [Mime] Added getDispostion() to TextPart to get current content disposition.
  • Loading branch information
fabpot committed Apr 14, 2023
2 parents a469556 + 09f0049 commit e738a6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Component/Mime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
---

* Support detection of related parts if `Content-Id` is used instead of the name
* Add `TextPart::getDispostion()`

6.2
---
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/Mime/Part/TextPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ public function setDisposition(string $disposition): static
return $this;
}

/**
* @return ?string null or one of attachment, inline, or form-data
*/
public function getDisposition(): ?string
{
return $this->disposition;
}

/**
* Sets the name of the file (used by FormDataPart).
*
Expand Down

0 comments on commit e738a6c

Please sign in to comment.