Total Complexity | 8 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class MediaOnNetwork |
||
8 | { |
||
9 | use InteractsWithHttpHeaders; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $path; |
||
15 | |||
16 | public function __construct(string $path, array $headers = []) |
||
17 | { |
||
18 | $this->path = $path; |
||
19 | $this->headers = $headers; |
||
20 | } |
||
21 | |||
22 | public static function make(string $path, array $headers = []): self |
||
25 | } |
||
26 | |||
27 | public function getPath(): string |
||
28 | { |
||
29 | return $this->path; |
||
30 | } |
||
31 | |||
32 | public function getDisk(): Disk |
||
33 | { |
||
34 | return Disk::make(config('filesystems.default')); |
||
35 | } |
||
36 | |||
37 | public function getLocalPath(): string |
||
38 | { |
||
39 | return $this->path; |
||
40 | } |
||
41 | |||
42 | public function getFilenameWithoutExtension(): string |
||
43 | { |
||
44 | return pathinfo($this->getPath())['filename']; |
||
45 | } |
||
46 | |||
47 | public function getFilename(): string |
||
50 | } |
||
51 | |||
52 | public function getCompiledHeaders(): array |
||
53 | { |
||
54 | return static::compileHeaders($this->getHeaders()); |
||
57 |