Copied!

A child container that proxies calls to a parser when attempting to access child parts.

CloneableInstantiableIterable
Methods
public __construct(ZBateson\MailMimeParser\Parser\Proxy\ParserMimePartProxy $parserProxy)
public ZBateson\MailMimeParser\Message\PartChildrenContainer::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 ZBateson\MailMimeParser\Message\PartChildrenContainer::current() : ?mixed
 
  • return \IMessagePart
public ZBateson\MailMimeParser\Message\PartChildrenContainer::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 ZBateson\MailMimeParser\Message\PartChildrenContainer::hasChildren() : bool
 

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

public ZBateson\MailMimeParser\Message\PartChildrenContainer::key() : int
public ZBateson\MailMimeParser\Message\PartChildrenContainer::next() : void
public offsetExists( $offset) : bool
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetGet(?mixed $offset) : ?mixed
 
  • param int $offset
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetSet(?mixed $offset, ?mixed $value) : void
 
  • param int $offset
  • param \IMessagePart $value
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetUnset( $offset) : void
 
  • param int $offset
public ZBateson\MailMimeParser\Message\PartChildrenContainer::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 ZBateson\MailMimeParser\Message\PartChildrenContainer::rewind() : void
public ZBateson\MailMimeParser\Message\PartChildrenContainer::valid() : bool
Properties
protected array ZBateson\MailMimeParser\Message\PartChildrenContainer::$children
 
  • var \IMessagePart[] array of child parts of the IMultiPart object that is holding this container.
protected ZBateson\MailMimeParser\Parser\Proxy\ParserMimePartProxy $parserProxy
 
  • var \ParserMimePartProxy The parser to proxy requests to when trying to get child parts.
protected ZBateson\MailMimeParser\Message\PartChildrenContainer::$position = 0
 
  • var int current key position within $children for iteration.
Properties
private bool $allParsed = false
 
  • var bool Set to true once all parts have been parsed, and requests to the proxy won't result in any more child parts.
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration