-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructureBuilder.php
More file actions
70 lines (53 loc) · 1.98 KB
/
StructureBuilder.php
File metadata and controls
70 lines (53 loc) · 1.98 KB
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
69
70
<?php
declare(strict_types=1);
/*
* This file is part of the RollerworksSearch package.
*
* (c) Sebastiaan Stok <s.stok@rollerscapes.net>
*
* 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.
*
* @psalm-type ErrorPath = array{0: string, 1: string, 2: string}
*
* @internal
*
* @author Sebastiaan Stok <s.stok@rollerscapes.net>
*/
interface StructureBuilder
{
public function getErrors(): ErrorList;
/**
* @return string|string[]
*/
public function getCurrentPath(): string | array;
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(mixed $value, string $path): void;
public function excludedSimpleValue(mixed $value, string $path): void;
/**
* @param ErrorPath $path [path, lower-path-pattern, upper-path-pattern]
*/
public function rangeValue(mixed $lower, mixed $upper, bool $lowerInclusive, bool $upperInclusive, array $path): void;
/**
* @param ErrorPath $path [path, lower-path-pattern, upper-path-pattern]
*/
public function excludedRangeValue(mixed $lower, mixed $upper, bool $lowerInclusive, bool $upperInclusive, array $path): void;
/**
* @param ErrorPath $path [base-path, operator-path, value-path]
*/
public function comparisonValue(mixed $operator, mixed $value, array $path): void;
/**
* @param ErrorPath $path [base-path, value-path, type-path]
*/
public function patterMatchValue(mixed $type, mixed $value, bool $caseInsensitive, array $path): void;
public function endValues();
}