You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.2 KiB
64 lines
1.2 KiB
<?php
|
|
|
|
namespace App\Data;
|
|
|
|
use http\Exception\InvalidArgumentException;
|
|
|
|
/**
|
|
* Base class of a user account.
|
|
* Contains the private information that we don't want
|
|
* to share to other users, or non-needed public information
|
|
*/
|
|
class Account {
|
|
/**
|
|
* @var string $email account's mail address
|
|
*/
|
|
private string $email;
|
|
|
|
/**
|
|
* @var string string token
|
|
*/
|
|
private string $token;
|
|
|
|
/**
|
|
* @var string the account's username
|
|
*/
|
|
private string $name;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
private int $id;
|
|
|
|
|
|
/**
|
|
* @param string $email
|
|
* @param string $name
|
|
* @param string $token
|
|
* @param int $id
|
|
*/
|
|
public function __construct(string $email, string $name, string $token, int $id) {
|
|
$this->email = $email;
|
|
$this->name = $name;
|
|
$this->token = $token;
|
|
$this->id = $id;
|
|
}
|
|
|
|
public function getId(): int {
|
|
return $this->id;
|
|
}
|
|
|
|
public function getEmail(): string {
|
|
return $this->email;
|
|
}
|
|
|
|
public function getToken(): string {
|
|
return $this->token;
|
|
}
|
|
|
|
public function getName(): string {
|
|
return $this->name;
|
|
}
|
|
|
|
}
|