Completed
Pull Request — develop (#27)
by Chris
11:56
created

AbstractPlaylist::isIndependentSegments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Model;
4
5
use Chrisyue\PhpM3u8\Model\Annotation\Tag;
6
use Stringy\Stringy as S;
7
use Chrisyue\PhpM3u8\Model\Context;
8
use Chrisyue\PhpM3u8\Model\Tag\Start;
9
10
abstract class AbstractPlaylist
11
{
12
    /**
13
     * @Tag
14
     */
15
    private $version;
16
17
    /**
18
     * @Tag
19
     */
20
    private $independentSegments;
21
22
    /**
23
     * @Tag(type="Chrisyue\PhpM3u8\Model\Tag\Start")
24
     */
25
    private $start;
26
27
    /**
28
     * @return bool
29
     */
30
    public function isIndependentSegments()
31
    {
32
        return $this->independentSegments;
33
    }
34
35
    /**
36
     * @param int $version
37
     *
38
     * @return self
39
     */
40
    public function setVersion($version)
41
    {
42
        $this->version = $version;
43
        Context::$params['version'] = $version;
44
45
        return $this;
46
    }
47
48
    /**
49
     * @return int
50
     */
51
    public function getVersion()
52
    {
53
        return $this->version;
54
    }
55
56
    /**
57
     * @param bool $independentSegments
58
     *
59
     * @return self
60
     */
61
    public function setIndependentSegments($independentSegments)
62
    {
63
        $this->independentSegments = $independentSegments;
64
65
        return $this;
66
    }
67
68
    /**
69
     * @param Start $start
70
     *
71
     * @return self
72
     */
73
    public function setStart(Start $start)
74
    {
75
        $this->start = $start;
76
77
        return $this;
78
    }
79
80
    /**
81
     * @return Start
82
     */
83
    public function getStart()
84
    {
85
        return $this->start;
86
    }
87
}
88