Mail_IMAP::_declareParts calls on imap_fetchstructure to parse the contents of a multipart message. Information such as the MIME type, size, file name, cid, charset and other parameters of each message part is gathered and stored in the Mail_IMAP::$msg property, which is in turn used internally by several of Mail_IMAP's methods to provide the required information about each message.
If a message has more than one part, Mail_IMAP::_declareParts calls on itself recursively assigning part ids and gathering other information about each message part.
Warning: As a method used internally by Mail_IMAP, Mail_IMAP::_declareParts should not be used directly. Its API has the potential of being changed in future releases, should I find a more efficient approach.
| param | int | &$mid message id |
| param | array | $sub_part The parts array of message child part. |
| param | str | $sub_pid Used to assign a part number to a message part. |
| param | int | $n The part counter. |
| param | int | $n The part counter. |
| param | bool | $is_sub_part Determines if the current part is a subpart, which toggles how the pid is created. |
| param | bool | $skip_part Determines whether the current part is parsed, this is necessary because some parts appearing in the object returned by imap_fetchstructure have no associated part id in the part numbering algorithm used by imap_fetchbody. |
| return | array|void | |
| access | protected | |
| see | imap_fetchstructure | |