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) : void
Public constructor
Name | Type | Description |
---|---|---|
$params | array | full message with or without headers |
Exception | Description |
---|---|
\Zend_Mail_Exception |
__get(string $name) : string
Getter 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() : null
Cache content and split in parts if multipart
Type | Description |
---|---|
null |
Exception | Description |
---|---|
\Zend_Mail_Exception |
current() : \Zend_Mail_Part
implements Iterator::current()
Type | Description |
---|---|
\Zend_Mail_Part | current part |
getChildren() : \Zend_Mail_Part
implements RecursiveIterator::getChildren()
Type | Description |
---|---|
\Zend_Mail_Part | same as self::current() |
getContent() : string
Body of part
Type | Description |
---|---|
string | body |
Exception | Description |
---|---|
\Zend_Mail_Exception |
getHeader(string $name, string $format = null) : string | array
Get 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 | array
Get 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() : array
Get all headers
Type | Description |
---|---|
array | headers as array(name => value) |
getPart(int $num) : \Zend_Mail_Part
Get 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() : string
Retrieve the class name used to encapsulate message parts
Type | Description |
---|---|
string |
getSize() : int
Return size of part
Type | Description |
---|---|
int | size |
hasChildren() : bool
implements RecursiveIterator::hasChildren()
Type | Description |
---|---|
bool | current element has children/is multipart |
headerExists(string $name) : boolean
Check wheater the Mail part has a specific header.
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
boolean |
isMultipart() : bool
Check if part is a multipart message
Type | Description |
---|---|
bool | if part is multipart |
setPartClass(string $class) : \Zend_Mail_Part
Set name pf class used to encapsulate message parts
Name | Type | Description |
---|---|---|
$class | string |
Type | Description |
---|---|
\Zend_Mail_Part |