mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Created BaseUserModel
This commit is contained in:
		@@ -5,10 +5,9 @@
 | 
			
		||||
 * @author Pierre HUBERT
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
class GeneralSettings {
 | 
			
		||||
class GeneralSettings extends BaseUserModel {
 | 
			
		||||
 | 
			
		||||
	//Private fields
 | 
			
		||||
	private $id;
 | 
			
		||||
	private $email;
 | 
			
		||||
	private $firstName;
 | 
			
		||||
	private $lastName;
 | 
			
		||||
@@ -21,15 +20,6 @@ class GeneralSettings {
 | 
			
		||||
	private $virtualDirectory;
 | 
			
		||||
	private $personnalWebsite;
 | 
			
		||||
 | 
			
		||||
	//Set and get user ID
 | 
			
		||||
	public function set_id(int $id){
 | 
			
		||||
		$this->id = $id;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public function get_id() : int {
 | 
			
		||||
		return $this->id;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//Set and get the email address of the user
 | 
			
		||||
	public function set_email(string $email){
 | 
			
		||||
		$this->email = $email;
 | 
			
		||||
@@ -150,13 +140,4 @@ class GeneralSettings {
 | 
			
		||||
	public function get_personnalWebsite() : string {
 | 
			
		||||
		return $this->personnalWebsite != null ? $this->personnalWebsite : "null";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Check wether is object is valid or not
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @return bool TRUE if this object is valid / FALSE else
 | 
			
		||||
	 */
 | 
			
		||||
	public function isValid() : bool {
 | 
			
		||||
		return $this->id > 0;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user