Completed
Push — master ( 479fbe...e1e56a )
by WEBEWEB
01:15
created

Video::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the pexels-library package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Pexels\Model;
13
14
/**
15
 * Video.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Library\Pexels\Model
19
 */
20
class Video extends AbstractMedia {
21
22
    /**
23
     * Duration.
24
     *
25
     * @var int
26
     */
27
    private $duration;
28
29
    /**
30
     * Full res.
31
     *
32
     * @var mixed
33
     */
34
    private $fullRes;
35
36
    /**
37
     * Image.
38
     *
39
     * @var string
40
     */
41
    private $image;
42
43
    /**
44
     * User.
45
     *
46
     * @var User
47
     */
48
    private $user;
49
50
    /**
51
     * Video files.
52
     *
53
     * @var VideoFile[]
54
     */
55
    private $videoFiles;
56
57
    /**
58
     * Video pictures.
59
     *
60
     * @var VideoPicture[]
61
     */
62
    private $videoPictures;
63
64
    /**
65
     * Constructor.
66
     */
67
    public function __construct() {
68
        parent::__construct();
69
70
        $this->setVideoFiles([]);
71
        $this->setVideoPictures([]);
72
    }
73
74
    /**
75
     * Add a video file.
76
     *
77
     * @param VideoFile $videoFile The video file.
78
     * @return Video Returns this video.
79
     */
80
    public function addVideoFile(VideoFile $videoFile) {
81
        $this->videoFiles[] = $videoFile;
82
        return $this;
83
    }
84
85
    /**
86
     * Add a video picture.
87
     *
88
     * @param VideoPicture $videoPicture The video picture.
89
     * @return Video Returns this video.
90
     */
91
    public function addVideoPicture(VideoPicture $videoPicture) {
92
        $this->videoPictures[] = $videoPicture;
93
        return $this;
94
    }
95
96
    /**
97
     * Get the duration.
98
     *
99
     * @return int Returns the duration.
100
     */
101
    public function getDuration() {
102
        return $this->duration;
103
    }
104
105
    /**
106
     * Get the full res.
107
     *
108
     * @return mixed Returns the full res.
109
     */
110
    public function getFullRes() {
111
        return $this->fullRes;
112
    }
113
114
    /**
115
     * Get the image.
116
     *
117
     * @return string Returns the image.
118
     */
119
    public function getImage() {
120
        return $this->image;
121
    }
122
123
    /**
124
     * Get the user.
125
     *
126
     * @return User Returns the user.
127
     */
128
    public function getUser() {
129
        return $this->user;
130
    }
131
132
    /**
133
     * Get the video files.
134
     *
135
     * @return VideoFile[] Returns teh video files.
136
     */
137
    public function getVideoFiles() {
138
        return $this->videoFiles;
139
    }
140
141
    /**
142
     * Get the video pictures.
143
     *
144
     * @return VideoPicture[] Returns teh video pictures.
145
     */
146
    public function getVideoPictures() {
147
        return $this->videoPictures;
148
    }
149
150
    /**
151
     * Set the duration.
152
     *
153
     * @param int $duration The duration.
154
     * @return Video Returns this video.
155
     */
156
    public function setDuration($duration) {
157
        $this->duration = $duration;
158
        return $this;
159
    }
160
161
    /**
162
     * Set the full re.
163
     *
164
     * @param mixed $fullRes The full res.
165
     * @return Video Returns this video.
166
     */
167
    public function setFullRes($fullRes) {
168
        $this->fullRes = $fullRes;
169
        return $this;
170
    }
171
172
    /**
173
     * Set the image.
174
     *
175
     * @param string $image The image.
176
     * @return Video Returns this video.
177
     */
178
    public function setImage($image) {
179
        $this->image = $image;
180
        return $this;
181
    }
182
183
    /**
184
     * Set the user.
185
     *
186
     * @param User|null $user The user.
187
     * @return Video Returns this video.
188
     */
189
    public function setUser(User $user = null) {
190
        $this->user = $user;
191
        return $this;
192
    }
193
194
    /**
195
     * Set the video files.
196
     *
197
     * @param VideoFile[] $videoFiles The video files.
198
     * @return Video Returns this video.
199
     */
200
    protected function setVideoFiles(array $videoFiles) {
201
        $this->videoFiles = $videoFiles;
202
        return $this;
203
    }
204
205
    /**
206
     * Set the video pictures.
207
     *
208
     * @param VideoPicture[] $videoPictures The video pictures.
209
     * @return Video Returns this video.
210
     */
211
    protected function setVideoPictures(array $videoPictures) {
212
        $this->videoPictures = $videoPictures;
213
        return $this;
214
    }
215
}
216