package |
Default |
inherited_from |
\Zend\Mail\Storage\Part |
Methods
Public constructor
__construct(array $params)
In addition to the parameters of Part::__construct() this constructor supports:
- file filename or file handle of a file with raw message content
- flags array with flags for message, keys are ignored, use constants defined in \Zend\Mail\Storage
inherited_from |
\Zend\Mail\Storage\Part::__construct() |
Parameters
$params
array
Exceptions
\Zend\Mail\Storage\Exception\RuntimeException |
|
Public constructor
__construct(array $params)
Inherited
Part supports different sources for content. The possible params are:
- handler an instance of AbstractStorage 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
- strict strictly parse raw content
Parameters
$params
array
full message with or without headers
Exceptions
\Zend\Mail\Storage\Exception\InvalidArgumentException |
|
Getter for mail headers - name is matched in lowercase
__get(string $name) : string
Inherited
This getter is short for Part::getHeader($name, 'string')
see |
|
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::__get() |
Parameters
Exceptions
\Zend\Mail\Storage\Exception\ExceptionInterface |
|
Returns
string
value of header
Isset magic method proxy to hasHeader
__isset($name) : boolean
Inherited
This method is short syntax for Part::hasHeader($name);
Parameters
$name
Returns
boolean
magic method to get content of part
__toString() : string
Inherited
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::__toString() |
Returns
string
content
Count parts of a multipart part
countParts() : integer
Inherited
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::countParts() |
Returns
integer
number of sub-parts
implements Iterator::current()
current() : \Zend\Mail\Storage\Part
Inherited
Returns
\Zend\Mail\Storage\Part
current part
implements RecursiveIterator::getChildren()
getChildren() : \Zend\Mail\Storage\Part
Inherited
Returns
\Zend\Mail\Storage\Part
same as self::current()
Body of part
getContent() : string
Inherited
If part is multipart the raw content of this part with all sub parts is returned
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::getContent() |
Exceptions
\Zend\Mail\Storage\Exception\RuntimeException |
|
Returns
string
body
get all set flags
getFlags() : array
inherited_from |
\Zend\Mail\Storage\Message\MessageInterface::getFlags() |
Returns
array
array with flags, key and value are the same for easy lookup
Get part of multipart message
getPart(integer $num) : \Zend\Mail\Storage\Part
Inherited
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::getPart() |
Parameters
$num
integer
number of part starting with 1 for first part
Exceptions
\Zend\Mail\Storage\Exception\RuntimeException |
|
Returns
\Zend\Mail\Storage\Part
wanted part
Return size of part
getSize() : integer
Inherited
Quite simple implemented currently (not decoding). Handle with care.
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::getSize() |
Returns
integer
size
return toplines as found after headers
getTopLines() : string
inherited_from |
\Zend\Mail\Storage\Message\MessageInterface::getTopLines() |
Returns
string
toplines
implements RecursiveIterator::hasChildren()
hasChildren() : boolean
Inherited
Returns
boolean
current element has children/is multipart
check if flag is set
hasFlag(mixed $flag) : boolean
inherited_from |
\Zend\Mail\Storage\Message\MessageInterface::hasFlag() |
Parameters
$flag
mixed
a flag name, use constants defined in \Zend\Mail\Storage
Returns
boolean
true if set, otherwise false
Check if part is a multipart message
isMultipart() : boolean
Inherited
inherited_from |
\Zend\Mail\Storage\Part\PartInterface::isMultipart() |
Returns
boolean
if part is multipart
implements Iterator::key()
key() : string
Inherited
Returns
string
key/number of current part
implements Iterator::next()
next()
Inherited
implements Iterator::rewind()
rewind()
Inherited
implements Iterator::valid()
valid() : boolean
Inherited
Returns
boolean
check if there's a current element
Cache content and split in parts if multipart
_cacheContent() : null
Inherited
Exceptions
\Zend\Mail\Storage\Exception\RuntimeException |
|
Returns
null
Properties
raw part body
$content : null | string
count of parts of a multipart message
$countParts : null | integer
flags for this message
$flags : array
current position of iterator
$iterationPos : integer
mail handler, if late fetch is active
$mail : null | \Zend\Mail\Storage\AbstractStorage
message number for mail handler
$messageNum : integer
parts of multipart message
$parts : array
toplines as fetched with headers
$topLines : string