File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ if you're just wishing a feature ;)
743743| getMimeType | | string or null | Get attachment mime type |
744744| getExtension | | string or null | Get a guessed attachment extension |
745745| getName | | string or null | Get attachment name |
746+ | setSize | | int or null | Get attachment size |
746747| getType | | string or null | Get attachment type |
747748| getDisposition | | string or null | Get attachment disposition |
748749| getContentType | | string or null | Get attachment content type |
Original file line number Diff line number Diff line change 2525 * @package Webklex\IMAP
2626 *
2727 * @property integer part_number
28+ * @property integer size
2829 * @property string content
2930 * @property string type
3031 * @property string content_type
4344 * @method string setContentType(string $content_type)
4445 * @method string getId()
4546 * @method string setId(string $id)
47+ * @method string getSize()
48+ * @method string setSize(integer $size)
4649 * @method string getName()
4750 * @method string getDisposition()
4851 * @method string setDisposition(string $disposition)
@@ -69,6 +72,7 @@ class Attachment {
6972 'name ' => null ,
7073 'disposition ' => null ,
7174 'img_src ' => null ,
75+ 'size ' => null ,
7276 ];
7377
7478 /**
@@ -206,6 +210,10 @@ protected function fetch() {
206210 $ this ->id = str_replace (['< ' , '> ' ], '' , $ this ->structure ->id );
207211 }
208212
213+ if (property_exists ($ this ->structure , 'bytes ' )) {
214+ $ this ->size = $ this ->structure ->bytes ;
215+ }
216+
209217 if (property_exists ($ this ->structure , 'dparameters ' )) {
210218 foreach ($ this ->structure ->dparameters as $ parameter ) {
211219 if (strtolower ($ parameter ->attribute ) == "filename " ) {
You can’t perform that action at this time.
0 commit comments