Initial Version
This commit is contained in:
146
shared/lib/Mail/Object/MessagePartMutableAbstract.php
Normal file
146
shared/lib/Mail/Object/MessagePartMutableAbstract.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\Mail\Object;
|
||||
|
||||
/**
|
||||
* Abstract Message Part Mutable Class
|
||||
*
|
||||
* Provides common implementation for mutable message parts
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
abstract class MessagePartMutableAbstract extends MessagePartBaseAbstract {
|
||||
|
||||
/**
|
||||
* Sets the blob identifier
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setBlobId(string $value): static {
|
||||
$this->data['blobId'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the part identifier
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setId(string $value): static {
|
||||
$this->data['partId'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the MIME type
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setType(string $value): static {
|
||||
$this->data['type'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content disposition
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setDisposition(string $value): static {
|
||||
$this->data['disposition'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the part name
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setName(string $value): static {
|
||||
$this->data['name'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the character set
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setCharset(string $value): static {
|
||||
$this->data['charset'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the language
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setLanguage(string $value): static {
|
||||
$this->data['language'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the location
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setLocation(string $value): static {
|
||||
$this->data['location'] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sub-parts
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
* @param MessagePartInterface ...$value
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setParts(MessagePartInterface ...$value): static {
|
||||
$this->parts = $value;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user