hasProperty("newsletter")){ $this->newsletter = true; } if (!$this->hasProperty("email")){ throw new CoreException("Impossible to create a user without a mail address"); } } public static function getCollectionName(){ return "users"; } } ?>