Passed
Push — master ( 3ee3fe...b14545 )
by Amin
04:48
created

HLS::isHlsAllowCache()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
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 PHP-FFmpeg-video-streaming package.
5
 *
6
 * (c) Amin Yazdanpanah <[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 Streaming;
13
14
use Streaming\Filters\HLSFilter;
15
use Streaming\Traits\Representation as Representations;
16
use Streaming\Filters\Filter;
17
18
class HLS extends Export
19
{
20
    use Representations;
21
22
    /** @var string */
23
    private $hls_time = 5;
24
25
    /** @var bool */
26
    private $hls_allow_cache = true;
27
28
    /** @var string */
29
    private $hls_key_info_file = "";
30
31
    /**
32
     * @param string $hls_time
33
     * @return HLS
34
     */
35
    public function setHlsTime(string $hls_time): HLS
36
    {
37
        $this->hls_time = $hls_time;
38
        return $this;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getHlsTime(): string
45
    {
46
        return $this->hls_time;
47
    }
48
49
    /**
50
     * @param bool $hls_allow_cache
51
     * @return HLS
52
     */
53
    public function setHlsAllowCache(bool $hls_allow_cache): HLS
54
    {
55
        $this->hls_allow_cache = $hls_allow_cache;
56
        return $this;
57
    }
58
59
    /**
60
     * @return bool
61
     */
62
    public function isHlsAllowCache(): bool
63
    {
64
        return $this->hls_allow_cache;
65
    }
66
67
    /**
68
     * @param string $hls_key_info_file
69
     * @return HLS
70
     */
71
    public function setHlsKeyInfoFile(string $hls_key_info_file): HLS
72
    {
73
        $this->hls_key_info_file = $hls_key_info_file;
74
        return $this;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getHlsKeyInfoFile(): string
81
    {
82
        return $this->hls_key_info_file;
83
    }
84
85
    /**
86
     * @return Filter
87
     */
88
    protected function getFilter(): Filter
89
    {
90
        return $this->filter;
91
    }
92
93
    /**
94
     * @return mixed|void
95
     */
96
    protected function setFilter()
97
    {
98
        $this->filter = new HLSFilter($this);
99
    }
100
}
101