1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00
Files
php-flarum/src/Search/SearchState.php
2021-03-19 19:13:50 +01:00

42 lines
830 B
PHP

<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Search;
use Flarum\Query\AbstractQueryState;
class SearchState extends AbstractQueryState
{
/**
* @var GambitInterface[]
*/
protected $activeGambits = [];
/**
* Get a list of the gambits that are active in this search.
*
* @return GambitInterface[]
*/
public function getActiveGambits()
{
return $this->activeGambits;
}
/**
* Add a gambit as being active in this search.
*
* @param GambitInterface $gambit
* @return void
*/
public function addActiveGambit(GambitInterface $gambit)
{
$this->activeGambits[] = $gambit;
}
}