Flarum\Core\Search\SearchCriteria::__construct PHP Method

__construct() public method

public __construct ( User $actor, string $query, array $sort = null )
$actor Flarum\Core\User The user performing the search.
$query string The search query.
$sort array An array of sort-order pairs, where the column is the key, and the order is the value. The order may be 'asc', 'desc', or an array of IDs to order by.
    public function __construct(User $actor, $query, array $sort = null)
    {
        $this->actor = $actor;
        $this->query = $query;
        $this->sort = $sort;
    }
SearchCriteria