/** * Initializes the object. * * @param string $operator Operator used for the expression * @param string $name Name of variable that should be compared. * @param mixed $value Value that the variable should be compared to */ public function __construct($operator, $name, $value) { if (!isset(self::$_operators[$operator])) { throw new MW_Common_Exception(sprintf('Invalid operator "%1$s"', $operator)); } parent::__construct($operator, $name, $value); }
/** * Initializes the object. * * @param MW_DB_Connection_Interface $conn Database connection object * @param string $operator Operator used for the expression * @param string $name Name of variable or column that should be compared. * @param mixed $value Value that the variable or column should be compared to */ public function __construct(MW_DB_Connection_Interface $conn, $operator, $name, $value) { if (!isset(self::$_operators[$operator])) { throw new MW_Common_Exception(sprintf('Invalid operator "%1$s"', $operator)); } parent::__construct($operator, $name, $value); $this->_conn = $conn; }