示例#1
0
 /**
  * Create where clause
  *
  * @param  Where|\Closure|string|array|Predicate\PredicateInterface $predicate
  * @param  string $combination One of the OP_* constants from Predicate\PredicateSet
  * @throws Exception\InvalidArgumentException
  * @return Select
  */
 public function where($predicate, $combination = Predicate\PredicateSet::OP_AND)
 {
     if ($predicate instanceof Where) {
         $this->where = $predicate;
     } else {
         $this->where->addPredicates($predicate, $combination);
     }
     return $this;
 }