2022-06-10 10:47:46 +00:00
|
|
|
<?php
|
|
|
|
|
2023-08-20 15:24:56 +00:00
|
|
|
namespace App\Values;
|
2022-06-10 10:47:46 +00:00
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
final class ExcerptSearchResult
|
|
|
|
{
|
2024-05-19 05:49:42 +00:00
|
|
|
private function __construct(
|
|
|
|
public Collection $songs,
|
|
|
|
public Collection $artists,
|
|
|
|
public Collection $albums,
|
|
|
|
public Collection $podcasts
|
|
|
|
) {
|
2022-06-10 10:47:46 +00:00
|
|
|
}
|
|
|
|
|
2024-05-19 05:49:42 +00:00
|
|
|
public static function make(Collection $songs, Collection $artists, Collection $albums, Collection $podcasts): self
|
2022-06-10 10:47:46 +00:00
|
|
|
{
|
2024-05-19 05:49:42 +00:00
|
|
|
return new self($songs, $artists, $albums, $podcasts);
|
2022-06-10 10:47:46 +00:00
|
|
|
}
|
|
|
|
}
|