email = $sanitized_email; $this->valid = true; } else{ $this->email = 'invalid'; $this->valid = false; } } public function getEmail(){ return $this->email; } public function getValid(){ return $this->valid; } public function __toString(): string { return $this->email; } }