Projekt

Obecné

Profil

Stáhnout (1.39 KB) Statistiky
| Větev: | Tag: | Revize:
1
<?php
2

    
3
namespace App\Enum;
4

    
5

    
6
class ESearchFormOperators
7
{
8
    const NOT_USED = '';
9
    const AND = 'and';
10
    const OR = 'or';
11
    const AND_NOT = 'and_not';
12

    
13
    const EQUALS = 'eq';
14
    const NOT_EQUALS = 'neq';
15
    const CONTAINS = 'con';
16
    const BEGINS_WITH = 'bw';
17
    const ENDS_WITH = 'ew';
18

    
19
    const IS = 'is';
20
    const IS_NOT = 'is_not';
21

    
22

    
23
    public static $wordSelectLabels = [
24
        self::NOT_USED => '- NOT USED -',
25
        self::AND => 'AND',
26
        self::OR => 'OR',
27
        self::AND_NOT => 'AND NOT'
28
    ];
29

    
30
    public static $wordWhereCondition = [
31
        self::AND => 'AND',
32
        self::OR => 'OR',
33
        self::AND_NOT => 'AND NOT'
34
    ];
35

    
36

    
37
    public static $selectLikeOperatorLabels = [
38
        self::EQUALS => 'Equals',
39
        self::NOT_EQUALS => 'Not equals',
40
        self::CONTAINS => 'Contains',
41
        self::BEGINS_WITH => 'Begins with',
42
        self::ENDS_WITH => 'Ends with'
43
    ];
44

    
45
    public static $selectLikeOperatorQueryCondition = [
46
        self::EQUALS => ' = ? ',
47
        self::NOT_EQUALS => ' <> ? ',
48
        self::CONTAINS => ' LIKE ? ',
49
        self::BEGINS_WITH => ' LIKE ? ',
50
        self::ENDS_WITH => ' LIKE ? '
51
    ];
52

    
53

    
54
    public static $selectEqualsOperatorLabels = [
55
        self::IS => 'Is',
56
        self::IS_NOT => 'Is not'
57
    ];
58

    
59
    public static $selectEqualsOperatorQueryCondition = [
60
        self::IS => ' = ? ',
61
        self::IS_NOT => ' <> ? '
62
    ];
63
}
(2-2/3)