mirror of
https://github.com/koel/koel
synced 2024-11-15 00:47:18 +00:00
28 lines
780 B
PHP
28 lines
780 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Values;
|
||
|
|
||
|
use App\Models\User;
|
||
|
|
||
|
final class ScanConfiguration
|
||
|
{
|
||
|
/**
|
||
|
* @param User $owner The user who owns the song
|
||
|
* @param bool $makePublic Whether to make the song public
|
||
|
* @param array<string> $ignores The tags to ignore/exclude (only taken into account if the song already exists)
|
||
|
* @param bool $force Whether to force syncing, even if the file is unchanged
|
||
|
*/
|
||
|
private function __construct(public User $owner, public bool $makePublic, public array $ignores, public bool $force)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public static function make(
|
||
|
User $owner,
|
||
|
bool $makePublic = false,
|
||
|
array $ignores = [],
|
||
|
bool $force = false
|
||
|
): self {
|
||
|
return new self($owner, $makePublic, $ignores, $force);
|
||
|
}
|
||
|
}
|