koel/app/Values/SongStorageMetadata/S3CompatibleMetadata.php

28 lines
511 B
PHP
Raw Normal View History

<?php
namespace App\Values\SongStorageMetadata;
use App\Facades\License;
2024-02-05 11:50:06 +00:00
class S3CompatibleMetadata implements SongStorageMetadata
{
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;
}
public function supported(): bool
{
return License::isPlus();
}
}