1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Define FilterInterface

This commit is contained in:
Alexander Skvortsov
2020-11-13 02:55:58 -05:00
parent 84c4e8dd6e
commit 0b2d01b75f

View File

@@ -0,0 +1,26 @@
<?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\Filter;
interface FilterInterface
{
/**
* This filter will only be run when a query contains a filter param with this key.
*/
public function getKey(): string;
/**
* Filters a query.
*
* @param WrappedFilter $filter
* @param string $value The value of the requested filter
*/
public function apply(WrappedFilter $wrappedFilter, $filterValue);
}