__construct()
__get()
__isset()
__toString()
countParts()
current()
getChildren()
getContent()
getHeader()
getHeaderField()
getHeaders()
getPart()
getSize()
hasChildren()
isMultipart()
key()
next()
rewind()
valid()
_cacheContent()
$content
$countParts
$headers
$iterationPos
$messageNum
$parts
$topLines
__construct(array $params)
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
array
full message with or without headers
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
__get(string $name) : string
This getter is short for Part::getHeader($name, 'string')
see | \Zend\Mail\Storage\Part::getHeader() |
---|
string
header name
\Zend\Mail\Storage\Exception\ExceptionInterface |
---|
string
value of header__isset($name) : bool
This method is short syntax for Part::hasHeader($name);
see | \Zend\Mail\Storage\Part::hasHeader |
---|
string
bool
__toString() : string
string
contentcountParts() : int
int
number of sub-partscurrent() : \Zend\Mail\Storage\Part
\Zend\Mail\Storage\Part
current partgetChildren() : \Zend\Mail\Storage\Part
\Zend\Mail\Storage\Part
same as self::current()getContent() : string
If part is multipart the raw content of this part with all sub parts is returned
\Zend\Mail\Storage\Exception\RuntimeException |
---|
string
bodygetHeader(string $name, string $format) : string | array | \Zend\Mail\Header\HeaderInterface | \ArrayIterator
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 Mime::LINEEND as delim).
string
name of header, matches case-insensitive, but camel-case is replaced with dashes
string
change type of return value to 'string' or 'array'
\Zend\Mail\Storage\Exception\InvalidArgumentException |
---|
string
array
\Zend\Mail\Header\HeaderInterface
\ArrayIterator
value of header in wanted or internal formatgetHeaderField(string $name, string $wantedPart, string $firstName) : string | array
If the header occurs more than once, only the value from the first header is returned.
Throws an Exception if the requested header does not exist. If the specific header field does not exist, returns null.
string
name of header, like in getHeader()
string
the wanted part, default is first, if null an array with all parts is returned
string
key name for the first part
\Zend\Mime\Exception\RuntimeException |
---|
string
array
wanted part or all parts as array($firstName => firstPart, partname => value)getPart(int $num) : \Zend\Mail\Storage\Part
int
number of part starting with 1 for first part
\Zend\Mail\Storage\Exception\RuntimeException |
---|
\Zend\Mail\Storage\Part
wanted partgetSize() : int
Quite simple implemented currently (not decoding). Handle with care.
int
sizehasChildren() : bool
bool
current element has children/is multipartisMultipart() : bool
bool
if part is multipartkey() : string
string
key/number of current partnext()
rewind()
valid() : bool
bool
check if there's a current element_cacheContent() : null
$content : null | string
$countParts : null | int
$iterationPos : int
$parts : array
$topLines : string