VideoEncodedEvent::getEncodingIds()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the XabbuhPandaBundle package.
5
 *
6
 * (c) Christian Flothmann <[email protected]>
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 Xabbuh\PandaBundle\Event;
13
14
use Symfony\Contracts\EventDispatcher\Event;
15
16
/**
17
 * Event that is triggered when a video was successfully encoded.
18
 *
19
 * @author Christian Flothmann <[email protected]>
20
 */
21
final class VideoEncodedEvent extends Event
22
{
23
    /**
24
     * The VIDEO_ENCODED event occurs when a video was successfully encoded.
25
     *
26
     * The event listener method receives a Xabbuh\PandaBundle\Event\VideoCreatedEvent instance.
27
     */
28
    const NAME = 'xabbuh_panda.video_encoded';
29
30
    /**
31
     * The id of the encoded video
32
     * @var string
33
     */
34
    private $videoId;
35
36
    /**
37
     * List of encoding ids of this video
38
     * @var string[]
39
     */
40
    private $encodingIds = array();
41
42
    /**
43
     * Constructs a new VideoEncodedEvent.
44
     *
45
     * @param string   $videoId     Video id
46
     * @param string[] $encodingIds Ids of the video's encodings
47
     */
48 4
    public function __construct($videoId, array $encodingIds)
49
    {
50 4
        $this->videoId = $videoId;
51 4
        $this->encodingIds = $encodingIds;
52 4
    }
53
54
    /**
55
     * Returns the video id.
56
     *
57
     * @return string The video id
58
     */
59 3
    public function getVideoId()
60
    {
61 3
        return $this->videoId;
62
    }
63
64
    /**
65
     * Returns the video's encoding ids.
66
     *
67
     * @return string[] The encoding ids
68
     */
69 3
    public function getEncodingIds()
70
    {
71 3
        return $this->encodingIds;
72
    }
73
}
74