mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +00:00
19 lines
434 B
PHP
19 lines
434 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Values;
|
||
|
|
||
|
use App\Models\Song;
|
||
|
use Illuminate\Support\Collection;
|
||
|
|
||
|
class QueueState
|
||
|
{
|
||
|
private function __construct(public Collection $songs, public ?Song $currentSong, public ?int $playbackPosition)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public static function create(Collection $songs, ?Song $currentSong = null, ?int $playbackPosition = 0): static
|
||
|
{
|
||
|
return new static($songs, $currentSong, $playbackPosition);
|
||
|
}
|
||
|
}
|