| 1 | <?php |
||
| 10 | abstract class AbstractAttachment implements \JsonSerializable |
||
| 11 | { |
||
| 12 | use UtilityTrait; |
||
| 13 | use ValidatorTrait; |
||
| 14 | |||
| 15 | protected const TYPE_IMAGE = 'image'; |
||
| 16 | protected const TYPE_AUDIO = 'audio'; |
||
| 17 | protected const TYPE_VIDEO = 'video'; |
||
| 18 | protected const TYPE_FILE = 'file'; |
||
| 19 | protected const TYPE_TEMPLATE = 'template'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Attachment constructor. |
||
| 28 | */ |
||
| 29 | public function __construct(string $type) |
||
| 33 | |||
| 34 | public function toArray(): array |
||
| 40 | |||
| 41 | public function jsonSerialize(): array |
||
| 45 | } |
||
| 46 |