A message part that contains children.

public __construct(?ZBateson\MailMimeParser\Message\IMimePart $parent = NULL, ?ZBateson\MailMimeParser\Message\PartStreamContainer $streamContainer = NULL, ?ZBateson\MailMimeParser\Message\PartChildrenContainer $partChildrenContainer = NULL)
public ZBateson\MailMimeParser\Message\MessagePart::__toString() : string
public addChild(ZBateson\MailMimeParser\Message\IMessagePart $part, ?int $position = NULL)
public ZBateson\MailMimeParser\Message\MessagePart::attach(SplObserver $observer) : void
public ZBateson\MailMimeParser\Message\MessagePart::attachContentStream(Psr\Http\Message\StreamInterface $stream, string $streamCharset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET)
  • return static
public ZBateson\MailMimeParser\Message\MessagePart::detach(SplObserver $observer) : void
public ZBateson\MailMimeParser\Message\MessagePart::detachContentStream()
  • return static
public getAllParts( $fnFilter = NULL)
public getAllPartsByMimeType( $mimeType)
public ZBateson\MailMimeParser\Message\MessagePart::getBinaryContentResourceHandle()
public ZBateson\MailMimeParser\Message\MessagePart::getBinaryContentStream()
public abstract ZBateson\MailMimeParser\Message\IMessagePart::getCharset() : ?string

Returns the charset of the content, or null if not applicable/defined.

  • return string|null the charset
public getChild( $index, $fnFilter = NULL)
public getChildCount( $fnFilter = NULL)
public getChildIterator()
public getChildParts( $fnFilter = NULL)
public ZBateson\MailMimeParser\Message\MessagePart::getContent(string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET) : ?string
public abstract ZBateson\MailMimeParser\Message\IMessagePart::getContentDisposition(?string $default = NULL) : ?string

Returns the content's disposition, or returns the value of $default if not defined.

  • param string $default Optional default value to return if not applicable/defined
  • return string|null the disposition.
public abstract ZBateson\MailMimeParser\Message\IMessagePart::getContentId() : ?string

Returns the Content ID of the part, or null if not defined.

  • return string|null the content ID.
public ZBateson\MailMimeParser\Message\MessagePart::getContentStream(string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET)
public abstract ZBateson\MailMimeParser\Message\IMessagePart::getContentTransferEncoding(?string $default = NULL) : ?string

Returns the content transfer encoding used to encode the content on this part, or the value of $default if not defined.

  • param mixed $default Optional default value to return if not applicable/defined
  • return string|null the transfer encoding defined for the part.
public abstract ZBateson\MailMimeParser\Message\IMessagePart::getContentType(string $default = 'text/plain') : ?string

Returns the mime type of the content, or $default if one is not set.

  • param string $default Optional override for the default return value of 'text/plain.
  • return string the mime type
public getCountOfPartsByMimeType( $mimeType)
public ZBateson\MailMimeParser\Message\MessagePart::getFilename() : ?string
public ZBateson\MailMimeParser\Message\MessagePart::getParent()
public getPart( $index, $fnFilter = NULL)
public getPartByContentId( $contentId)
public getPartByMimeType( $mimeType, $index = 0)
public getPartCount( $fnFilter = NULL)
public ZBateson\MailMimeParser\Message\MessagePart::getResourceHandle()
public ZBateson\MailMimeParser\Message\MessagePart::getStream()
public ZBateson\MailMimeParser\Message\MessagePart::hasContent() : bool
public abstract ZBateson\MailMimeParser\Message\IMessagePart::isMime() : bool

Returns true if the current part is a mime part.

public abstract ZBateson\MailMimeParser\Message\IMessagePart::isTextPart() : bool

Returns true if the content of this part is plain text.

public ZBateson\MailMimeParser\Message\MessagePart::notify() : void
public removeAllParts( $fnFilter = NULL) : int
public removePart(ZBateson\MailMimeParser\Message\IMessagePart $part) : ?int
public ZBateson\MailMimeParser\Message\MessagePart::save( $filenameResourceOrStream, string $filemode = 'w+')
  • return static
public ZBateson\MailMimeParser\Message\MessagePart::saveContent( $filenameResourceOrStream) : self
public ZBateson\MailMimeParser\Message\MessagePart::setCharsetOverride(string $charsetOverride, bool $onlyIfNoCharset = false)
  • return static
public ZBateson\MailMimeParser\Message\MessagePart::setContent( $resource, string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET)
  • return static
protected ZBateson\MailMimeParser\Message\MessagePart::$charsetOverride = NULL
  • var ?string can be used to set an override for content's charset in cases where a user knows the charset on the content is not what it claims to be.
protected ZBateson\MailMimeParser\Message\MessagePart::$ignoreTransferEncoding = NULL
  • var bool set to true when a user attaches a stream manually, it's assumed to already be decoded or to have relevant transfer encoding decorators attached already.
protected ZBateson\MailMimeParser\Message\MessagePart::$observers = NULL
  • var \SplObjectStorage attached observers that need to be notified of modifications to this part.
protected ZBateson\MailMimeParser\Message\MessagePart::$parent = NULL
  • var ?\IMimePart parent part
protected $partChildrenContainer = NULL
  • var \PartChildrenContainer child part container
protected ZBateson\MailMimeParser\Message\MessagePart::$partStreamContainer = NULL
  • var \PartStreamContainer holds 'stream' and 'content stream'.
private getAllPartsIterator() : AppendIterator
private iteratorFindAt(Iterator $iter, $index, $fnFilter = NULL)
© 2024 Bruce Wells
Search Namespaces \ Classes