forked from GNUsocial/gnu-social
21 lines
499 B
PHP
21 lines
499 B
PHP
<?php
|
|
|
|
declare(strict_types = 1);
|
|
|
|
namespace Component\Collection\Util\Controller;
|
|
|
|
use App\Core\Controller;
|
|
use App\Entity\Actor;
|
|
use App\Util\Common;
|
|
use Component\Feed\Feed;
|
|
|
|
class Collection extends Controller
|
|
{
|
|
public function query(string $query, ?string $language = null, ?Actor $actor = null)
|
|
{
|
|
$actor ??= Common::actor();
|
|
$language ??= $actor->getTopLanguage()->getLocale();
|
|
return Feed::query($query, $this->int('page') ?? 1, $language, $actor);
|
|
}
|
|
}
|