Copied!

Container of IMessagePart items for a parent IMultiPart.

CloneableInstantiableIterable
Methods
public __construct(array $children = [])
 
  • param \IMessagePart[] $children
public add(ZBateson\MailMimeParser\Message\IMessagePart $part, $position = NULL) : static
 

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

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

  • param \IMessagePart $part The part to add
  • param int $position An optional index position (0-based) to add the child at.
public current() : ?mixed
 
  • return \IMessagePart
public getChildren() : ?RecursiveIterator
 

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

  • return \RecursiveIterator<\IMessagePart>|null the iterator
public hasChildren() : bool
 

Returns true if the current element is an IMultiPart. Note that the iterator may still be empty.

public key() : int
public next() : void
public offsetExists(?mixed $offset) : bool
 
  • param int $offset
public offsetGet(?mixed $offset) : ?mixed
 
  • param int $offset
public offsetSet(?mixed $offset, ?mixed $value) : void
 
  • param int $offset
  • param \IMessagePart $value
public offsetUnset( $offset) : void
 
  • param int $offset
public remove(ZBateson\MailMimeParser\Message\IMessagePart $part) : ?int
 

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

  • param \IMessagePart $part The part to remove.
  • return int the 0-based position it previously occupied.
public rewind() : void
public valid() : bool
Properties
protected array $children
 
  • var \IMessagePart[] array of child parts of the IMultiPart object that is holding this container.
protected $position = 0
 
  • var int current key position within $children for iteration.
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration