SECTION_ATTACHMENTS
SECTION_ATTACHMENTS
Used to handle sections of the e-mail easier
Class for all incoming messages
This class get message and generates a message structure of the form:
$incomingMessage = new IncomingMessage();
$incomingMessage->header;
$incomingMessage->message;
$incomingMessage->attachments;
$incomingMessage->section;
$incomingMessage->structure;
$incomingMessage->debug;
And marks the message read.
__construct(resource $imapStream, integer $id, string $decode = self::DECODE) : \SSilence\ImapClient\IncomingMessage
Called when the class has a new instance made of it
| resource | $imapStream | |
| integer | $id | |
| string | $decode |
getSection(string $section, array|null $options = null) : \SSilence\ImapClient\Section
Get a section message
Return object with 2 properties: $obj->structure $obj->body
| string | $section | |
| array|null | $options | have one option $options['class']. It create object, which must be instance \SSilence\ImapClient\Section. |
object
getCountSection() : array
Get count section
We take $this->section and make a simple array from an array of arrays. If getRecursiveSections($this->structure) set $this->section to NULL, then we think that there is only one section in the letter. We install $this->section[0] = [0], and then we will take this into account in subsequent processing. Namely here getSection() and $this->getSectionStructure() or getSectionStructureFromIncomingStructure(). Because if the message id is correct and the structure is returned, then there is exactly one section in the message.
sections
imapHeaderInfo() : object
Imap Header Info
Wrapper for http://php.net/manual/ru/function.imap-headerinfo.php