setStream($streamFactory->newMessagePartStream($this)); } parent::__construct( $streamContainer, $parent ); $this->mode = $mode; $this->filename = $filename; } /** * Returns the filename included in the uuencoded 'begin' line for this * part. * * @return string */ public function getFilename(): ?string { return $this->filename; } /** * @return static */ public function setFilename(string $filename) { $this->filename = $filename; $this->notify(); return $this; } /** * 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 function isTextPart(): bool { return false; } /** * Returns 'application/octet-stream'. * * @return string */ public function getContentType(string $default = 'application/octet-stream'): ?string { return 'application/octet-stream'; } /** * Returns null */ public function getCharset(): ?string { return null; } /** * Returns 'attachment'. */ public function getContentDisposition(?string $default = 'attachment'): ?string { return 'attachment'; } /** * Returns 'x-uuencode'. */ public function getContentTransferEncoding(?string $default = 'x-uuencode'): ?string { return 'x-uuencode'; } public function getUnixFileMode(): ?int { return $this->mode; } /** * @return static */ public function setUnixFileMode(int $mode) { $this->mode = $mode; $this->notify(); return $this; } }