Completed
Push — develop ( 23b8a0...80c8c3 )
by Michele
11:06
created

InputMediaPhoto::getCaption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Input;
6
use Zanzara\Telegram\Type\MessageEntity;
7
8
/**
9
 * Represents a photo to be sent.
10
 *
11
 * More on https://core.telegram.org/bots/api#inputmediaphoto
12
 */
13
class InputMediaPhoto
14
{
15
16
    /**
17
     * Type of the result, must be photo
18
     *
19
     * @var string
20
     */
21
    private $type;
22
23
    /**
24
     * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
25
     * Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using
26
     * multipart/form-data under <file_attach_name> name. More info on Sending Files >>
27
     *
28
     * @var string
29
     */
30
    private $media;
31
32
    /**
33
     * Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
34
     *
35
     * @var string|null
36
     */
37
    private $caption;
38
39
    /**
40
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in
41
     * the media caption.
42
     *
43
     * @var string|null
44
     */
45
    private $parse_mode;
46
47
    /**
48
     * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
49
     *
50
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
51
     *
52
     * @var \Zanzara\Telegram\Type\MessageEntity[]|null
53
     */
54
    private $caption_entities;
55
56
    /**
57
     * @return string
58
     */
59
    public function getType(): string
60
    {
61
        return $this->type;
62
    }
63
64
    /**
65
     * @param string $type
66
     */
67
    public function setType(string $type): void
68
    {
69
        $this->type = $type;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getMedia(): string
76
    {
77
        return $this->media;
78
    }
79
80
    /**
81
     * @param string $media
82
     */
83
    public function setMedia(string $media): void
84
    {
85
        $this->media = $media;
86
    }
87
88
    /**
89
     * @return string|null
90
     */
91
    public function getCaption(): ?string
92
    {
93
        return $this->caption;
94
    }
95
96
    /**
97
     * @param string|null $caption
98
     */
99
    public function setCaption(?string $caption): void
100
    {
101
        $this->caption = $caption;
102
    }
103
104
    /**
105
     * @return string|null
106
     */
107
    public function getParseMode(): ?string
108
    {
109
        return $this->parse_mode;
110
    }
111
112
    /**
113
     * @param string|null $parse_mode
114
     */
115
    public function setParseMode(?string $parse_mode): void
116
    {
117
        $this->parse_mode = $parse_mode;
118
    }
119
120
    /**
121
     * @return MessageEntity[]|null
122
     */
123
    public function getCaptionEntities(): ?array
124
    {
125
        return $this->caption_entities;
126
    }
127
128
    /**
129
     * @param MessageEntity[]|null $caption_entities
130
     */
131
    public function setCaptionEntities(?array $caption_entities): void
132
    {
133
        $this->caption_entities = $caption_entities;
134
    }
135
136
}