/** * Creates an instance of binary expression node, representing the construction: subject in set * * @param mixed $subject logical subject * @param array $set set of value the subject should match * * SQL example: * @code * // "type" IN ("completed", "pending") * Expression::in("type", array("completed", "pending")); * @endcode * @return InSetExpression */ static function in($subject, array $set) { return new InSetExpression($subject, $set, InSetLogicalOperator::in()); }
/** * @param mixed $subject logical subject * @param array $set set of values the subject should match * @param InSetLogicalOperator|null $operator logical operator */ function __construct($subject, array $set, InSetLogicalOperator $operator = null) { $this->subject = $subject; $this->set = $set; $this->operator = $operator ? $operator : InSetLogicalOperator::in(); }