public function __get($name) { if (!isset($this->constraints[$name])) { throw new PropertyNotFound("The constraint '{$name}' is not valid for this validator."); } return $this->constraints[$name]; }