MailMimeParser 2.3

PartChildrenContainer
in package
implements ArrayAccess, RecursiveIterator

Container of IMessagePart items for a parent IMultiPart.

Tags
author

Zaahid Bateson

Interfaces, Classes, Traits and Enums

ArrayAccess
RecursiveIterator

Table of Contents

$children  : array<string|int, IMessagePart>
$position  : int
__construct()  : mixed
add()  : mixed
Adds the passed IMessagePart to the container in the passed position.
current()  : mixed
getChildren()  : RecursiveIterator|null
If the current element points to an IMultiPart, its child iterator is returned by calling {@see IMultiPart::getChildIterator()}.
hasChildren()  : bool
Returns true if the current element is an IMultiPart and doesn't return null for {@see IMultiPart::getChildIterator()}. Note that the iterator may still be empty.
key()  : int
next()  : void
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
remove()  : int
Removes the passed part, and returns the integer position it occupied.
rewind()  : void
valid()  : bool

Properties

Methods

__construct()

public __construct([array<string|int, mixed> $children = [] ]) : mixed
Parameters
$children : array<string|int, mixed> = []
Return values
mixed

add()

Adds the passed IMessagePart to the container in the passed position.

public add(IMessagePart $part[, int $position = null ]) : mixed

If position is not passed or null, the part is added to the end, as the last child in the container.

Parameters
$part : IMessagePart

The part to add

$position : int = null

An optional index position (0-based) to add the child at.

Return values
mixed

getChildren()

If the current element points to an IMultiPart, its child iterator is returned by calling {@see IMultiPart::getChildIterator()}.

public getChildren() : RecursiveIterator|null
Return values
RecursiveIterator|null

the iterator

hasChildren()

Returns true if the current element is an IMultiPart and doesn't return null for {@see IMultiPart::getChildIterator()}. Note that the iterator may still be empty.

public hasChildren() : bool
Return values
bool

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed
Return values
void

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Return values
void

remove()

Removes the passed part, and returns the integer position it occupied.

public remove(IMessagePart $part) : int
Parameters
$part : IMessagePart

The part to remove.

Return values
int

the 0-based position it previously occupied.

Search results