Streaming::setAdditionalParams()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
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\Traits\Representations;
15
16
17
abstract class Streaming extends Stream
18
{
19
    use Representations;
20
21
    /** @var string */
22
    private $strict = "-2";
23
24
    /** @var array */
25
    private $additional_params = [];
26
27
    /**
28
     * Streaming constructor.
29
     * @param Media $media
30
     */
31
    public function __construct(Media $media)
32
    {
33
        $this->reps = new RepsCollection();
34
        parent::__construct($media);
35
    }
36
    /**
37
     * @return array
38
     */
39
    public function getAdditionalParams(): array
40
    {
41
        return $this->additional_params;
42
    }
43
44
    /**
45
     * @param array $additional_params
46
     * @return Stream
47
     */
48
    public function setAdditionalParams(array $additional_params)
49
    {
50
        $this->additional_params = $additional_params;
51
        return $this;
52
    }
53
54
    /**
55
     * @param string $strict
56
     * @return Stream
57
     */
58
    public function setStrict(string $strict): Stream
59
    {
60
        $this->strict = $strict;
61
        return $this;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getStrict(): string
68
    {
69
        return $this->strict;
70
    }
71
72
}