1 | <?php |
||
10 | class MediaExporter |
||
11 | { |
||
12 | protected $media; |
||
13 | |||
14 | protected $disk; |
||
15 | |||
16 | protected $frameMustBeAccurate = false; |
||
17 | |||
18 | protected $format; |
||
19 | |||
20 | public function __construct(Media $media) |
||
25 | |||
26 | protected function getFormat(): FormatInterface |
||
30 | |||
31 | public function inFormat(FormatInterface $format): self |
||
37 | |||
38 | protected function getDisk(): Disk |
||
42 | |||
43 | public function toDisk(string $diskName): self |
||
49 | |||
50 | public function accurate(): self |
||
56 | |||
57 | public function unaccurate(): self |
||
63 | |||
64 | public function getAccuracy(): bool |
||
68 | |||
69 | public function save(string $path): Media |
||
92 | |||
93 | private function saveFrame(string $fullPath): self |
||
99 | |||
100 | private function saveAudioOrVideo(string $fullPath): self |
||
106 | } |
||
107 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: