PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.22
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.22
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Services / wpfluent / src / QueryBuilder / JoinBuilder.php

JoinBuilder.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.22, at app/Services/wpfluent/src/QueryBuilder/JoinBuilder.php

46 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace WpFluent\QueryBuilder;
2
3 class JoinBuilder extends QueryBuilderHandler
4 {
5 /**
6 * @param $key
7 * @param $operator
8 * @param $value
9 *
10 * @return $this
11 */
12 public function on($key, $operator, $value)
13 {
14 return $this->joinHandler($key, $operator, $value, 'AND');
15 }
16
17 /**
18 * @param $key
19 * @param $operator
20 * @param $value
21 *
22 * @return $this
23 */
24 public function orOn($key, $operator, $value)
25 {
26 return $this->joinHandler($key, $operator, $value, 'OR');
27 }
28
29 /**
30 * @param $key
31 * @param null $operator
32 * @param null $value
33 * @param string $joiner
34 *
35 * @return $this
36 */
37 protected function joinHandler($key, $operator = null, $value = null, $joiner = 'AND')
38 {
39 $key = $this->addTablePrefix($key);
40 $value = $this->addTablePrefix($value);
41 $this->statements['criteria'][] = compact('key', 'operator', 'value', 'joiner');
42
43 return $this;
44 }
45 }
46