-
Notifications
You must be signed in to change notification settings - Fork 0
/
StructureBuilder.php
68 lines (51 loc) · 1.87 KB
/
StructureBuilder.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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\Value\ValuesGroup;
/**
* Works as a wrapper around the ValuesGroup, and ValuesBag transforming
* input while ensuring restrictions are honored.
*
* @internal
*
* @author Sebastiaan Stok <[email protected]>
*/
interface StructureBuilder
{
public function getErrors(): ErrorList;
public function getCurrentPath();
public function getRootGroup(): ValuesGroup;
public function enterGroup(string $groupLocal = 'AND', string $path = '[%d]'): void;
public function leaveGroup(): void;
public function field(string $name, string $path): void;
public function simpleValue($value, string $path): void;
public function excludedSimpleValue($value, string $path): void;
/**
* @param array $path [path, lower-path-pattern, upper-path-pattern]
*/
public function rangeValue($lower, $upper, bool $lowerInclusive, bool $upperInclusive, array $path): void;
/**
* @param array $path [path, lower-path-pattern, upper-path-pattern]
*/
public function excludedRangeValue($lower, $upper, bool $lowerInclusive, bool $upperInclusive, array $path): void;
/**
* @param string $operator
* @param array $path [base-path, operator-path, value-path]
*/
public function comparisonValue($operator, $value, array $path): void;
/**
* @param string $type
* @param string $value
* @param array $path [base-path, value-path, type-path]
*/
public function patterMatchValue($type, $value, bool $caseInsensitive, array $path): void;
public function endValues();
}