Exemplo n.º 1
0
 public function testComment()
 {
     $query = ['$comment' => 'Bar'];
     $this->filter->comment('Foo');
     $this->filter->comment('Bar');
     $this->assertEquals($query, $this->filter->toArray());
 }
Exemplo n.º 2
0
 /**
  * Add new `and`, `or` or `xor` sub query
  *
  * @param        $operator
  * @param Filter $condition
  *
  * @return $this
  */
 protected function addLogicExpr($operator, Filter $condition)
 {
     if (!isset($this->expressions[$operator])) {
         $this->expressions[$operator] = [];
     }
     $this->expressions[$operator][] = $condition->toArray();
     return $this;
 }