/** * Returns the SQL to check if a value is one in a set of * given values. * * in() accepts an arbitrary number of parameters. The first parameter * must always specify the value that should be matched against. Successive * must contain a logical expression or an array with logical expressions. * These expressions will be matched against the first parameter. * * @param string $column the value that should be matched against * @param string|array(string) values that will be matched against $column * @return string logical expression */ public function getInExpression($column, $values) { if (!is_array($values)) { $values = array($values); } $values = $this->getIdentifiers($values); if (count($values) == 0) { throw DoctrineException::valuesArrayForInOperatorInvalid(); } return $column . ' IN (' . implode(', ', $values) . ')'; }