Fully Qualified Name: | Zend\Mail\Storage\Part\File |
Extends: | Part |
Name | Description | Defined By |
---|---|---|
__construct() | Public constructor | File |
__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 | File |
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 | File |
getSize() | Return size of part | File |
hasChildren() | implements RecursiveIterator::hasChildren() | Part |
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
This handler supports the following params:
Parameter Name | Type | Description |
---|---|---|
$params | array | full |
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
Parameter Name | Type | Description |
---|---|---|
$stream | resource | Optional |
Returns: string body
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
implements RecursiveIterator::hasChildren()
Returns: bool current element has children/is multipart
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