Zend Framework
1.12
|
Public Member Functions | |
__construct (array $params) | |
Public constructor. | |
setPartClass ($class) | |
Set name pf class used to encapsulate message parts. | |
getPartClass () | |
Retrieve the class name used to encapsulate message parts. | |
isMultipart () | |
Check if part is a multipart message. | |
getContent () | |
Body of part. | |
getSize () | |
Return size of part. | |
getPart ($num) | |
Get part of multipart message. | |
countParts () | |
Count parts of a multipart part. | |
getHeaders () | |
Get all headers. | |
getHeader ($name, $format=null) | |
Get a header in specificed format. | |
headerExists ($name) | |
Check wheater the Mail part has a specific header. | |
getHeaderField ($name, $wantedPart=0, $firstName=0) | |
Get a specific field from a header like content type or all fields as array. | |
__get ($name) | |
Getter for mail headers - name is matched in lowercase. | |
__isset ($name) | |
Isset magic method proxy to hasHeader. | |
__toString () | |
magic method to get content of part | |
hasChildren () | |
implements RecursiveIterator::hasChildren() | |
getChildren () | |
implements RecursiveIterator::getChildren() | |
valid () | |
implements Iterator::valid() | |
next () | |
implements Iterator::next() | |
key () | |
implements Iterator::key() | |
current () | |
implements Iterator::current() | |
rewind () | |
implements Iterator::rewind() | |
Protected Member Functions | |
_cacheContent () | |
Cache content and split in parts if multipart. | |
Protected Attributes | |
$_headers | |
$_content | |
$_topLines = '' | |
$_parts = array() | |
$_countParts | |
$_iterationPos = 1 | |
$_mail | |
$_messageNum = 0 | |
$_partClass | |
__construct | ( | array | $params | ) |
Public constructor.
Zend_Mail_Part supports different sources for content. The possible params are:
array | $params | full message with or without headers |
Zend_Mail_Exception |
__get | ( | $name | ) |
Getter for mail headers - name is matched in lowercase.
This getter is short for Zend_Mail_Part::getHeader($name, 'string')
string | $name | header name |
Zend_Mail_Exception |
Implements Zend_Mail_Part_Interface.
__isset | ( | $name | ) |
Isset magic method proxy to hasHeader.
This method is short syntax for Zend_Mail_Part::hasHeader($name);
string |
__toString | ( | ) |
|
protected |
Cache content and split in parts if multipart.
Zend_Mail_Exception |
countParts | ( | ) |
Count parts of a multipart part.
Implements Zend_Mail_Part_Interface.
current | ( | ) |
implements Iterator::current()
getChildren | ( | ) |
implements RecursiveIterator::getChildren()
getContent | ( | ) |
Body of part.
If part is multipart the raw content of this part with all sub parts is returned
Zend_Mail_Exception |
Implements Zend_Mail_Part_Interface.
getHeader | ( | $name, | |
$format = null |
|||
) |
Get 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).
string | $name | name of header, matches case-insensitive, but camel-case is replaced with dashes |
string | $format | change type of return value to 'string' or 'array' |
Zend_Mail_Exception |
Implements Zend_Mail_Part_Interface.
getHeaderField | ( | $name, | |
$wantedPart = 0 , |
|||
$firstName = 0 |
|||
) |
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 a Zend_Mail_Exception if the requested header does not exist. If the specific header field does not exist, returns null.
string | $name | name of header, like in getHeader() |
string | $wantedPart | the wanted part, default is first, if null an array with all parts is returned |
string | $firstName | key name for the first part |
Zend_Exception,Zend_Mail_Exception |
Implements Zend_Mail_Part_Interface.
getHeaders | ( | ) |
Get all headers.
The returned headers are as saved internally. All names are lowercased. The value is a string or an array if a header with the same name occurs more than once.
Implements Zend_Mail_Part_Interface.
getPart | ( | $num | ) |
Get part of multipart message.
int | $num | number of part starting with 1 for first part |
Zend_Mail_Exception |
Implements Zend_Mail_Part_Interface.
getPartClass | ( | ) |
Retrieve the class name used to encapsulate message parts.
getSize | ( | ) |
Return size of part.
Quite simple implemented currently (not decoding). Handle with care.
Implements Zend_Mail_Part_Interface.
hasChildren | ( | ) |
implements RecursiveIterator::hasChildren()
headerExists | ( | $name | ) |
Check wheater the Mail part has a specific header.
string | $name |
isMultipart | ( | ) |
Check if part is a multipart message.
Implements Zend_Mail_Part_Interface.
key | ( | ) |
implements Iterator::key()
next | ( | ) |
implements Iterator::next()
rewind | ( | ) |
implements Iterator::rewind()
setPartClass | ( | $class | ) |
valid | ( | ) |
implements Iterator::valid()
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |