Smiling Souls

Steeped in the delicious tea like leaves of anthroposophy for the evolving soul.


array|void _declareParts(int &$mid, [ array $sub_part = NULL[, str $sub_pid = NULL[, int $n = 0[, bool $is_sub_part = FALSE[, bool $skip_part = FALSE]]]]])

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.

Method summary:

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()


There are no comments posted at this time.

Leave a Comment

Simple HTML is allowed: <code>, <b>, <i>, <u>, <var>, <strong>, <em>, <blockquote>, <ul>, <ol>, <li>, <p> (no attributes). All spacing and line breaks in your comment will be preserved.

* All comments are moderated and are subject to approval.
Your comment will appear once it has been approved.
Posting multiple times will not expedite the approval process.

Comments are closed at this time.

© Copyright 2015 Hot Toddy, All Rights Reserved.