2024-02-04 20:31:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Values\SongStorageMetadata;
|
|
|
|
|
2024-02-05 13:27:17 +00:00
|
|
|
use App\Facades\License;
|
|
|
|
|
2024-02-05 11:50:06 +00:00
|
|
|
class S3CompatibleMetadata implements SongStorageMetadata
|
2024-02-04 20:31:01 +00:00
|
|
|
{
|
|
|
|
private function __construct(public string $bucket, public string $key)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function make(string $bucket, string $key): self
|
|
|
|
{
|
|
|
|
return new static($bucket, $key);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPath(): string
|
|
|
|
{
|
|
|
|
return $this->key;
|
|
|
|
}
|
2024-02-05 13:27:17 +00:00
|
|
|
|
|
|
|
public function supported(): bool
|
|
|
|
{
|
|
|
|
return License::isPlus();
|
|
|
|
}
|
2024-02-04 20:31:01 +00:00
|
|
|
}
|