Completed
Push — master ( 4db12a...16d0ae )
by WEBEWEB
02:00
created

DataTablesSearch::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle\API;
13
14
/**
15
 * DataTables search.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\JQuery\DataTablesBundle\API
19
 */
20
class DataTablesSearch implements DataTablesSearchInterface {
21
22
    /**
23
     * Regex.
24
     *
25
     * @var bool
26
     */
27
    private $regex;
28
29
    /**
30
     * Value.
31
     *
32
     * @var string
33
     */
34
    private $value;
35
36
    /**
37
     * Constructor.
38
     */
39
    public function __construct() {
40
        $this->setRegex(false);
41
        $this->setValue("");
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getRegex() {
48
        return $this->regex;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getValue() {
55
        return $this->value;
56
    }
57
58
    /**
59
     * Set the regex.
60
     *
61
     * @param bool $regex The regex.
62
     * @return DataTablesSearchInterface Returns this search.
63
     */
64
    public function setRegex($regex) {
65
        $this->regex = $regex;
66
        return $this;
67
    }
68
69
    /**
70
     * Set the value.
71
     *
72
     * @param string $value The value.
73
     * @return DataTablesSearchInterface Returns this search.
74
     */
75
    public function setValue($value) {
76
        $this->value = $value;
77
        return $this;
78
    }
79
80
}
81