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)
 

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()
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|null the iterator
public ZBateson\MailMimeParser\Message\PartChildrenContainer::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.

public ZBateson\MailMimeParser\Message\PartChildrenContainer::key() : int
public ZBateson\MailMimeParser\Message\PartChildrenContainer::next() : void
public offsetExists( $offset) : bool
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetGet( $offset)
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetSet( $offset, $value) : void
public ZBateson\MailMimeParser\Message\PartChildrenContainer::offsetUnset( $offset) : void
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 ZBateson\MailMimeParser\Message\PartChildrenContainer::$children = NULL
 
  • var \IMessagePart[] array of child parts of the IMultiPart object that is holding this container.
protected $parserProxy = NULL
 
  • 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 $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.
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration