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