2022-01-03 05:04:52 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
namespace Component\Collection\Util\Controller;
|
|
|
|
|
|
|
|
use App\Core\Controller;
|
2022-01-04 05:37:22 +09:00
|
|
|
use App\Entity\Actor;
|
|
|
|
use App\Util\Common;
|
2022-01-09 00:10:39 +09:00
|
|
|
use Component\Collection\Collection as CollectionModule;
|
2022-01-03 05:04:52 +09:00
|
|
|
|
|
|
|
class Collection extends Controller
|
|
|
|
{
|
2022-02-28 06:12:51 +09:00
|
|
|
public function query(string $query, ?string $locale = null, ?Actor $actor = null, array $note_order_by = [], array $actor_order_by = []): array
|
2022-01-03 08:59:23 +09:00
|
|
|
{
|
2022-01-05 06:58:49 +09:00
|
|
|
$actor ??= Common::actor();
|
2022-01-10 19:17:05 +09:00
|
|
|
$locale ??= Common::currentLanguage()->getLocale();
|
2022-02-28 06:12:51 +09:00
|
|
|
return CollectionModule::query($query, $this->int('page') ?? 1, $locale, $actor, $note_order_by, $actor_order_by);
|
2022-01-03 08:59:23 +09:00
|
|
|
}
|
2022-01-03 05:04:52 +09:00
|
|
|
}
|