Total Complexity | 9 |
Total Lines | 85 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
22 | class Media |
||
23 | { |
||
24 | |||
25 | protected $media; |
||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $path; |
||
30 | /** |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $is_tmp; |
||
34 | |||
35 | /** |
||
36 | * Media constructor. |
||
37 | * @param MediaTypeInterface $media |
||
38 | * @param string $path |
||
39 | * @param bool $is_tmp |
||
40 | */ |
||
41 | public function __construct(MediaTypeInterface $media, string $path, bool $is_tmp) |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return DASH |
||
50 | */ |
||
51 | public function DASH(): DASH |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return HLS |
||
58 | */ |
||
59 | public function HLS(): HLS |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return StreamToFile |
||
66 | */ |
||
67 | public function stream2file(): StreamToFile |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param $argument |
||
74 | * @return Media |
||
75 | */ |
||
76 | private function isInstanceofArgument($argument) |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * @param $method |
||
83 | * @param $parameters |
||
84 | * @return Media |
||
85 | */ |
||
86 | public function __call($method, $parameters) |
||
87 | { |
||
88 | return $this->isInstanceofArgument( |
||
89 | call_user_func_array([$this->media, $method], $parameters) |
||
90 | ); |
||
91 | } |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | public function getPath(): string |
||
97 | { |
||
98 | return $this->path; |
||
99 | } |
||
100 | |||
101 | /** |
||
102 | * @return bool |
||
103 | */ |
||
104 | public function isTmp(): bool |
||
107 | } |
||
108 | } |