Copied!

Implementation of a non-mime message's uuencoded attachment part.

CloneableInstantiable
Methods
public __construct(?int $mode = NULL, ?string $filename = NULL, ?ZBateson\MailMimeParser\Message\IMimePart $parent = NULL, ?Psr\Log\LoggerInterface $logger = NULL, ?ZBateson\MailMimeParser\Message\PartStreamContainer $streamContainer = NULL)
public ZBateson\MailMimeParser\Message\MessagePart::__toString() : string
public ZBateson\MailMimeParser\ErrorBag::addError(string $message, string $psrLogLevel, ?Throwable $exception = NULL) : static
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) : static
public ZBateson\MailMimeParser\Message\MessagePart::detach(SplObserver $observer) : void
public ZBateson\MailMimeParser\Message\MessagePart::detachContentStream() : static
public ZBateson\MailMimeParser\ErrorBag::getAllErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array
public ZBateson\MailMimeParser\Message\MessagePart::getBinaryContentResourceHandle() : ?mixed
public ZBateson\MailMimeParser\Message\MessagePart::getBinaryContentStream() : ?ZBateson\MailMimeParser\Stream\MessagePartStreamDecorator
public getCharset() : ?string
 

Returns null

public ZBateson\MailMimeParser\Message\MessagePart::getContent(string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET) : ?string
public getContentDisposition(?string $default = 'attachment') : ?string
 

Returns 'attachment'.

public ZBateson\MailMimeParser\Message\NonMimePart::getContentId() : ?string
 

Returns the Content ID of the part.

NonMimeParts do not have a Content ID, and so this simply returns null.

public ZBateson\MailMimeParser\Message\MessagePart::getContentStream(string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET) : ?ZBateson\MailMimeParser\Stream\MessagePartStreamDecorator
public getContentTransferEncoding(?string $default = 'x-uuencode') : ?string
 

Returns 'x-uuencode'.

public getContentType(string $default = 'application/octet-stream') : ?string
 

Returns 'application/octet-stream'.

public ZBateson\MailMimeParser\Message\MessagePart::getErrorLoggingContextName() : string
public ZBateson\MailMimeParser\ErrorBag::getErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array
public getFilename() : ?string
 

Returns the filename included in the uuencoded 'begin' line for this part.

public ZBateson\MailMimeParser\Message\MessagePart::getParent() : ?ZBateson\MailMimeParser\Message\IMimePart
public ZBateson\MailMimeParser\Message\MessagePart::getResourceHandle() : ?mixed
public ZBateson\MailMimeParser\Message\MessagePart::getStream() : Psr\Http\Message\StreamInterface
public getUnixFileMode() : ?int
public ZBateson\MailMimeParser\ErrorBag::hasAnyErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool
public ZBateson\MailMimeParser\Message\MessagePart::hasContent() : bool
public ZBateson\MailMimeParser\ErrorBag::hasErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool
public ZBateson\MailMimeParser\Message\NonMimePart::isMime() : bool
 

Returns false.

public isTextPart() : bool
 

Returns false.

Although the part may be plain text, there is no reliable way of determining its type since uuencoded 'begin' lines only include a file name and no mime type. The file name's extension may be a hint.

  • return false
public ZBateson\MailMimeParser\Message\MessagePart::notify() : void
public ZBateson\MailMimeParser\Message\MessagePart::save( $filenameResourceOrStream, string $filemode = 'w+') : static
public ZBateson\MailMimeParser\Message\MessagePart::saveContent( $filenameResourceOrStream) : static
public ZBateson\MailMimeParser\Message\MessagePart::setCharsetOverride(string $charsetOverride, bool $onlyIfNoCharset = false) : static
public ZBateson\MailMimeParser\Message\MessagePart::setContent( $resource, string $charset = 'UTF-8'ZBateson\MailMimeParser\MailMimeParser::DEFAULT_CHARSET) : static
public setFilename(string $filename) : static
public setUnixFileMode(int $mode) : static
Properties
protected ?string 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. to be.
protected ?string $filename = NULL
 
  • var string the name of the file in the uuencoding 'header'.
protected bool ZBateson\MailMimeParser\Message\MessagePart::$ignoreTransferEncoding = false
 
  • 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. decorators attached already.
protected Psr\Log\LoggerInterface ZBateson\MailMimeParser\ErrorBag::$logger
protected ?int $mode = NULL
 
  • var int the unix file permission
protected SplObjectStorage ZBateson\MailMimeParser\Message\MessagePart::$observers
 
  • var \SplObjectStorage attached observers that need to be notified of modifications to this part. modifications to this part.
protected ?ZBateson\MailMimeParser\Message\IMimePart ZBateson\MailMimeParser\Message\MessagePart::$parent
 
  • var ?\IMimePart parent part
protected ZBateson\MailMimeParser\Message\PartStreamContainer ZBateson\MailMimeParser\Message\MessagePart::$partStreamContainer
 
  • var \PartStreamContainer holds 'stream' and 'content stream'.
Methods
protected ZBateson\MailMimeParser\Message\MessagePart::getErrorBagChildren() : array
protected ZBateson\MailMimeParser\ErrorBag::validate() : void
 

Perform any extra validation and call 'addError'.

getErrors and getAllErrors call validate() if their $validate parameter is true. validate() is only called once on an object with getErrors getAllErrors.

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration