mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
21 lines
496 B
PHP
21 lines
496 B
PHP
<?php
|
|
|
|
namespace App\Values;
|
|
|
|
use App\Models\Song as Playable;
|
|
use Illuminate\Support\Collection;
|
|
|
|
final class QueueState
|
|
{
|
|
private function __construct(
|
|
public Collection $playables,
|
|
public ?Playable $currentPlayable,
|
|
public ?int $playbackPosition
|
|
) {
|
|
}
|
|
|
|
public static function make(Collection $songs, ?Playable $currentPlayable = null, ?int $playbackPosition = 0): self
|
|
{
|
|
return new self($songs, $currentPlayable, $playbackPosition);
|
|
}
|
|
}
|