id = $id; } // getter for id property public function getId() { return $this->id; } // setter for first_name property public function setFirstName($first_name) { if (empty($first_name) || !is_string($first_name)) { throw new Exception('First name must be a non-empty string.'); } $this->first_name = $first_name; } // getter for first_name property public function getFirstName() { return $this->first_name; } // setter for last_name property public function setLastName($last_name) { if (empty($last_name) || !is_string($last_name)) { throw new Exception('Last name must be a non-empty string.'); } $this->last_name = $last_name; } // getter for last_name property public function getLastName() { return $this->last_name; } // setter for email property public function setEmail($email) { if (empty($email) || !is_string($email) || strpos($email, '@') === FALSE) { throw new Exception('Email must be a well-formatted email address.'); } $this->email = $email; } // getter for email property public function getEmail() { return $this->email; } } ?>