1 | <?php |
||
6 | class Attachment implements \JsonSerializable |
||
7 | { |
||
8 | |||
9 | use ValidatorTrait; |
||
10 | |||
11 | const TYPE_IMAGE = 'image'; |
||
12 | const TYPE_AUDIO = 'audio'; |
||
13 | const TYPE_VIDEO = 'video'; |
||
14 | const TYPE_FILE = 'file'; |
||
15 | const TYPE_TEMPLATE = 'template'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $type; |
||
21 | |||
22 | /** |
||
23 | * Attachment constructor. |
||
24 | * |
||
25 | * @param string $type |
||
26 | */ |
||
27 | public function __construct(string $type) |
||
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | public function jsonSerialize(): array |
||
43 | } |