Fully Qualified Name: | Zend\Mail\Storage\Message |
Extends: | Part |
Implements: | MessageInterface |
Name | Description | Defined By |
---|---|---|
__construct() | Public constructor | Message |
__get() | Getter for mail headers - name is matched in lowercase | Part |
__isset() | Isset magic method proxy to hasHeader | Part |
__toString() | magic method to get content of part | Part |
countParts() | Count parts of a multipart part | Part |
current() | implements Iterator::current() | Part |
getChildren() | implements RecursiveIterator::getChildren() | Part |
getContent() | Body of part | Part |
getFlags() | get all set flags | Message |
getHeader() | Get a header in specified format | Part |
getHeaderField() | Get a specific field from a header like content type or all fields as array | Part |
getHeaders() | Access headers collection | Part |
getPart() | Get part of multipart message | Part |
getSize() | Return size of part | Part |
getTopLines() | return toplines as found after headers | Message |
hasChildren() | implements RecursiveIterator::hasChildren() | Part |
hasFlag() | check if flag is set | Message |
isMultipart() | Check if part is a multipart message | Part |
key() | implements Iterator::key() | Part |
next() | implements Iterator::next() | Part |
rewind() | implements Iterator::rewind() | Part |
valid() | implements Iterator::valid() | Part |
Public constructor
In addition to the parameters of Part::__construct() this constructor supports:
Parameter Name | Type | Description |
---|---|---|
$params | array |
Returns:
Getter for mail headers - name is matched in lowercase
This getter is short for Part::getHeader($name, 'string')
Parameter Name | Type | Description |
---|---|---|
$name | string | header |
Returns: string value of header
Isset magic method proxy to hasHeader
This method is short syntax for Part::hasHeader($name);
Parameter Name | Type | Description |
---|---|---|
$ | string | |
$name |
Returns: bool
magic method to get content of part
Returns: string content
Count parts of a multipart part
Returns: int number of sub-parts
implements Iterator::current()
Returns: \Part current part
implements RecursiveIterator::getChildren()
Returns: \Part same as self::current()
Body of part
If part is multipart the raw content of this part with all sub parts is returned
Returns: string body
get all set flags
Returns: array array with flags, key and value are the same for easy lookup
Get a header in specified format
Internally headers that occur more than once are saved as array, all other as string. If $format is set to string implode is used to concat the values (with Mime::LINEEND as delim).
Parameter Name | Type | Description |
---|---|---|
$name | string | name |
$format | string | change |
Returns: string|array|\HeaderInterface|\ArrayIterator value of header in wanted or internal format
Get a specific field from a header like content type or all fields as array
If the header occurs more than once, only the value from the first header is returned.
Throws an Exception if the requested header does not exist. If the specific header field does not exist, returns null.
Parameter Name | Type | Description |
---|---|---|
$name | string | name |
$wantedPart | string | the |
$firstName | string | key |
Returns: string|array wanted part or all parts as array($firstName => firstPart, partname => value)
Access headers collection
Lazy-loads if not already attached.
Returns: \Headers
Get part of multipart message
Parameter Name | Type | Description |
---|---|---|
$num | int | number |
Returns: \Part wanted part
Return size of part
Quite simple implemented currently (not decoding). Handle with care.
Returns: int size
return toplines as found after headers
Returns: string toplines
implements RecursiveIterator::hasChildren()
Returns: bool current element has children/is multipart
check if flag is set
Parameter Name | Type | Description |
---|---|---|
$flag | mixed | a |
Returns: bool true if set, otherwise false
Check if part is a multipart message
Returns: bool if part is multipart
implements Iterator::key()
Returns: string key/number of current part
implements Iterator::next()
Returns:
implements Iterator::rewind()
Returns:
implements Iterator::valid()
Returns: bool check if there's a current element