-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInputProcessor.php
40 lines (35 loc) · 1.23 KB
/
InputProcessor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
/*
* This file is part of the RollerworksSearch package.
*
* (c) Sebastiaan Stok <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Rollerworks\Component\Search;
use Rollerworks\Component\Search\Input\ProcessorConfig;
/**
* The InputProcessor must be implemented by all input-processor.
*
* @author Sebastiaan Stok <[email protected]>
*/
interface InputProcessor
{
/**
* Process the input and returns the result.
*
* The processor should only handle fields that are registered in
* the FieldSet.
*
* @param ProcessorConfig $config Configuration for the processor
* @param mixed $input Input to process, actual format depends
* on the processor implementation
*
* @throws Exception\InvalidSearchConditionException When there are errors in the input
* this can be a failed transformation
* or processing error
*/
public function process(ProcessorConfig $config, $input): SearchCondition;
}