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.
null|string $_content = ''
raw part body
null|int $_countParts = ''
count of parts of a multipart message
null|array $_headers = ''
headers of part as array
int $_iterationPos = '1'
current position of iterator
null|Zend_Mail_Storage_Abstract $_mail = ''
mail handler, if late fetch is active
int $_messageNum = '0'
message number for mail handler
array $_parts = 'array'
parts of multipart message
string $_topLines = ''
toplines as fetched with headers
__construct(
array $params
)
:
Public constructor
Zend_Mail_Part supports different sources for content. The possible params are: - handler a instance of Zend_Mail_Storage_Abstract for late fetch - id number of message for handler - raw raw content with header and body as string - headers headers as array (name => value) or string, if a content part is found it's used as toplines - noToplines ignore content found after headers in param 'headers' - content content as string
__get(
string $name
)
:
string
Getter for mail headers - name is matched in lowercase
This getter is short for Zend_Mail_Part::getHeader($name, 'string')
__isset(
$name
)
:
boolean
Isset magic method proxy to hasHeader
This method is short syntax for Zend_Mail_Part::hasHeader($name);
__toString(
)
:
string
magic method to get content of part
_cacheContent(
)
:
null
Cache content and split in parts if multipart
countParts(
)
:
int
Count parts of a multipart part
current(
)
:
Zend_Mail_Part
implements Iterator::current()
getChildren(
)
:
Zend_Mail_Part
implements RecursiveIterator::getChildren()
getContent(
)
:
string
Body of part
If part is multipart the raw content of this part with all sub parts is returned
getHeader(
string $name, string $format
=
null
)
:
string|array
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).
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
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.
getHeaders(
)
:
array
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.
getPart(
int $num
)
:
Zend_Mail_Part
Get part of multipart message
getSize(
)
:
int
Return size of part
Quite simple implemented currently (not decoding). Handle with care.
hasChildren(
)
:
bool
implements RecursiveIterator::hasChildren()
headerExists(
string $name
)
:
boolean
Check wheater the Mail part has a specific header.
isMultipart(
)
:
bool
Check if part is a multipart message
key(
)
:
string
implements Iterator::key()
next(
)
:
null
implements Iterator::next()
rewind(
)
:
null
implements Iterator::rewind()
valid(
)
:
bool
implements Iterator::valid()