Skip to content

Commit bfca9b5

Browse files
committed
hasAttachments() method added
1 parent 0d467cf commit bfca9b5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/IMAP/Message.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,15 @@ public function getAttachments() {
628628
return $this->attachments;
629629
}
630630

631+
/**
632+
* Checks if there are any attachments present
633+
*
634+
* @return boolean
635+
*/
636+
public function hasAttachments() {
637+
return $this->attachments->isEmpty() === false;
638+
}
639+
631640
/**
632641
* Set a given flag
633642
* @param string|array $flag

0 commit comments

Comments
 (0)