public function setConstraints($constraints) { $this->constraints = array(); $this->addConstraints($constraints); }