Пример #1
0
 /**
  * Add a condition to the container
  *
  * @param string $object
  * @param string $op
  * @param mixed $val
  */
 public function where($object, $op = 'eq', $val = '')
 {
     if ($this->query->isRelationDefinition($object)) {
         $parts = explode(':', $object);
         $this->query->setJoin($parts[0]);
     }
     $condition = new One_Query_Condition($object, $op, $val);
     $this->conditions[] = $condition;
     return $this->conditions[count($this->conditions) - 1];
 }