Mail/Part.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mail
- Version
- $Id$
\Zend_Mail_Part
- Implements
- Children
- \Zend_Mail_Message
- \Zend_Mail_Part_File
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

null|\Zend_Mail_Storage_Abstract $_mail- Type
- null | \Zend_Mail_Storage_Abstract
Methods

__construct(array $params) : voidPublic constructor
| Name | Type | Description |
|---|---|---|
| $params | array | full message with or without headers |
| Exception | Description |
|---|---|
| \Zend_Mail_Exception |

__get(string $name) : stringGetter for mail headers - name is matched in lowercase
| Name | Type | Description |
|---|---|---|
| $name | string | header name |
| Type | Description |
|---|---|
| string | value of header |
| Exception | Description |
|---|---|
| \Zend_Mail_Exception |

_cacheContent() : nullCache content and split in parts if multipart
| Type | Description |
|---|---|
| null |
| Exception | Description |
|---|---|
| \Zend_Mail_Exception |

current() : \Zend_Mail_Partimplements Iterator::current()
| Type | Description |
|---|---|
| \Zend_Mail_Part | current part |

getChildren() : \Zend_Mail_Partimplements RecursiveIterator::getChildren()
| Type | Description |
|---|---|
| \Zend_Mail_Part | same as self::current() |

getContent() : stringBody of part
| Type | Description |
|---|---|
| string | body |
| Exception | Description |
|---|---|
| \Zend_Mail_Exception |

getHeader(string $name, string $format = null) : string | arrayGet a header in specificed format
| 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' |
| Type | Description |
|---|---|
| string | array | value of header in wanted or internal format |
| Exception | Description |
|---|---|
| \Zend_Mail_Exception |

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
| 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 |
| Type | Description |
|---|---|
| string | array | wanted part or all parts as array($firstName => firstPart, partname => value) |
| Exception | Description |
|---|---|
| \Zend_Exception, | Zend_Mail_Exception |

getHeaders() : arrayGet all headers
| Type | Description |
|---|---|
| array | headers as array(name => value) |

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

getPartClass() : stringRetrieve the class name used to encapsulate message parts
| Type | Description |
|---|---|
| string |

getSize() : intReturn size of part
| Type | Description |
|---|---|
| int | size |

hasChildren() : boolimplements RecursiveIterator::hasChildren()
| Type | Description |
|---|---|
| bool | current element has children/is multipart |

headerExists(string $name) : booleanCheck wheater the Mail part has a specific header.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

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

setPartClass(string $class) : \Zend_Mail_PartSet name pf class used to encapsulate message parts
| Name | Type | Description |
|---|---|---|
| $class | string |
| Type | Description |
|---|---|
| \Zend_Mail_Part |