Mail/Part/Interface.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mail
- Subpackage
- Storage
- Version
- $Id$
\Zend_Mail_Part_Interface
Package: Zend_Mail\Storage- Parent(s)
- \RecursiveIterator
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods



__get(string $name) : stringGetter for mail headers - name is matched in lowercase
This getter is short for Zend_Mail_Part::getHeader($name, 'string')
Parameters| Name | Type | Description |
|---|
| $name | string | header name |
|---|
Returns| Type | Description |
|---|
| string | value of header |
ThrowsDetails- See
-



__toString() : stringmagic method to get content of part
Returns| Type | Description |
|---|
| string | content |



countParts() : intCount parts of a multipart part
Returns| Type | Description |
|---|
| int | number of sub-parts |



getHeader(string $name, string $format = null) : string | arrayGet a header in specificed 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 Zend_Mime::LINEEND as delim).
Parameters| Name | Type | Description |
|---|
| $name | string | name of header, matches case-insensitive, but camel-case is replaced with dashes |
|---|
| $format | string | change type of return value to 'string' or 'array' |
|---|
Returns| Type | Description |
|---|
| string | array | value of header in wanted or internal format |
Throws


getHeaderField(string $name, string $wantedPart = 0, string $firstName = 0) : string | arrayGet 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 a Zend_Mail_Exception if the requested header does not exist. If
the specific header field does not exist, returns null.
Parameters| Name | Type | Description |
|---|
| $name | string | name of header, like in getHeader() |
|---|
| $wantedPart | string | the wanted part, default is first, if null an array with all parts is returned |
|---|
| $firstName | string | key name for the first part |
|---|
Returns| Type | Description |
|---|
| string | array | wanted part or all parts as array($firstName => firstPart, partname => value) |
Throws


getPart(int $num) : \Zend_Mail_PartGet part of multipart message
Parameters| Name | Type | Description |
|---|
| $num | int | number of part starting with 1 for first part |
|---|
ReturnsThrows 


isMultipart() : boolCheck if part is a multipart message
Returns| Type | Description |
|---|
| bool | if part is multipart |