/var/www/html_fr/wp-content/plugins/fluent-smtp/app/Services/DB/QueryBuilder/JoinBuilder.php


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
<?php namespace FluentMail\App\Services\DB\QueryBuilder;

class 
JoinBuilder extends QueryBuilderHandler
{
    
/**
     * @param $key
     * @param $operator
     * @param $value
     *
     * @return $this
     */
    
public function on($key$operator$value)
    {
        return 
$this->joinHandler($key$operator$value'AND');
    }

    
/**
     * @param $key
     * @param $operator
     * @param $value
     *
     * @return $this
     */
    
public function orOn($key$operator$value)
    {
        return 
$this->joinHandler($key$operator$value'OR');
    }

    
/**
     * @param        $key
     * @param null   $operator
     * @param null   $value
     * @param string $joiner
     *
     * @return $this
     */
    
protected function joinHandler($key$operator null$value null$joiner 'AND')
    {
        
$key $this->addTablePrefix($key);
        
$value $this->addTablePrefix($value);
        
$this->statements['criteria'][] = compact('key''operator''value''joiner');

        return 
$this;
    }
}