/** * @return bool */ protected function checkEqualTo() { if ($this->equalToConstraint instanceof Field) { return $this->value === $this->equalToConstraint->getValue(); } else { return true; } }
/** * @param $name * @param Field $field * @return Field */ public function addField($name, Field $field) { $this->fields[$name] = $field; $field->setParent($this); return $field; }