public function __construct($panel, $data, array $links = []) { if (!empty($data['member_id'])) { $this->member_id = $data['member_id']; } if (!empty($data['key'])) { $this->id = $data['key']; } $required = ['email_address', 'gender', 'postal_code', 'year_of_birth']; foreach ($required as $field) { if (empty($data[$field])) { throw new CintException("`{$field}` is a required field"); } } if (!empty($links)) { $this->paths = Client::parsePathsJSON($links); } $this->panel = $panel; $this->data = $data; }