mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Define FilterInterface
This commit is contained in:
26
src/Filter/FilterInterface.php
Normal file
26
src/Filter/FilterInterface.php
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user