1 | <?php |
||
9 | class File extends AbstractAttachment |
||
10 | { |
||
11 | /** |
||
12 | * @var string|null |
||
13 | */ |
||
14 | protected $url; |
||
15 | |||
16 | /** |
||
17 | * @var bool|null |
||
18 | */ |
||
19 | protected $reusable; |
||
20 | |||
21 | /** |
||
22 | * @var string|null |
||
23 | */ |
||
24 | protected $attachmentId; |
||
25 | |||
26 | /** |
||
27 | * File constructor. |
||
28 | * |
||
29 | * @param string $type |
||
30 | * |
||
31 | * @throws \Kerox\Messenger\Exception\MessengerException |
||
32 | */ |
||
33 | 6 | public function __construct(string $url, ?bool $reusable = null, $type = AbstractAttachment::TYPE_FILE) |
|
46 | |||
47 | /** |
||
48 | * @throws \Kerox\Messenger\Exception\MessengerException |
||
49 | * |
||
50 | * @return \Kerox\Messenger\Model\Message\Attachment\File |
||
51 | */ |
||
52 | 2 | public static function create(string $url, ?bool $reusable = null): self |
|
56 | |||
57 | 6 | private function isAttachmentId(string $value): bool |
|
61 | |||
62 | 6 | public function toArray(): array |
|
75 | } |
||
76 |