PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.7.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.7.0
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
← All changes | includes/Core/Database/Helper.php +15 -9 2.02.7.0 View file →
@@ -1,16 +1,18 @@
1 1 <?php
2 2
3 3 namespace BitCode\BitForm\Core\Database;
4 4
5 -final class Helper {
5 +final class Helper
6 +{
6 7 // public static function getTableName($className)
7 8 // {
8 - // $className = str_replace('\\', '', $className);
9 - // $className = str_replace('Model', '', $className);
10 - // return strtolower($className);
9 + // $className = str_replace('\\', '', $className);
10 + // $className = str_replace('Model', '', $className);
11 + // return strtolower($className);
11 12 // }
12 - public function arrValueModifyByLogic($operator, $value) {
13 + public function arrValueModifyByLogic($operator, $value)
14 + {
13 15 $oprators = [
14 16 'equal' => '["' . implode('","', $value) . '"]',
15 17 'not_equal' => '["' . implode('","', $value) . '"]',
16 18 'start_with' => '["' . implode('","', $value) . '"%',
@@ -29,9 +31,10 @@
29 31
30 32 return $value;
31 33 }
32 34
33 - public function dateQueryList() {
35 + public function dateQueryList()
36 + {
34 37 return [
35 38 'today' => 'Y-m-d_+0 days_=',
36 39 'till_today' => 'Y-m-d_+0 days_<=',
37 40 'tomorrow' => 'Y-m-d_+1 days_=',
@@ -59,9 +62,10 @@
59 62 'last_year' => 'Y_-1 year_=',
60 63 ];
61 64 }
62 65
63 - public function strValueModifyByLogic($operator, $value) {
66 + public function strValueModifyByLogic($operator, $value)
67 + {
64 68 $timeInterval = $this->dateQueryList();
65 69
66 70 if (isset($timeInterval[$operator])) {
67 71 $data = explode('_', $timeInterval[$operator]);
@@ -95,9 +99,10 @@
95 99
96 100 return $value;
97 101 }
98 102
99 - public function convertToSqlOperator($operator) {
103 + public function convertToSqlOperator($operator)
104 + {
100 105 $timeInterval = $this->dateQueryList();
101 106
102 107 if (isset($timeInterval[$operator])) {
103 108 $data = explode('_', $timeInterval[$operator]);
@@ -127,9 +132,10 @@
127 132
128 133 return $operator;
129 134 }
130 135
131 - public function fieldQueryByDate($fld, $operator, $value, $logic) {
136 + public function fieldQueryByDate($fld, $operator, $value, $logic)
137 + {
132 138 $currentYear = date('Y');
133 139
134 140 $sql = '';
135 141