generated from Templates_CodeFirst/templateHtmlCss
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.
47 lines
786 B
47 lines
786 B
<?php
|
|
|
|
class User
|
|
{
|
|
private $id;
|
|
private $username;
|
|
private $password;
|
|
|
|
function __construct( int $id, string $username, string $password)
|
|
{
|
|
$this->id=$id;
|
|
$this->username=$username;
|
|
$this->password=$password;
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return $this->id . " " . $this->username;
|
|
}
|
|
|
|
|
|
public function getId(){
|
|
return $this->id;
|
|
}
|
|
|
|
public function getUsername(){
|
|
return $this->username;
|
|
}
|
|
|
|
public function getPassword(){
|
|
return $this->password;
|
|
}
|
|
|
|
public function setId(int $id){
|
|
$this->id=$id;
|
|
}
|
|
|
|
public function setUsername(string $username){
|
|
$this->username=$username;
|
|
}
|
|
|
|
public function setPassword(string $password){
|
|
$this->password=$password;
|
|
}
|
|
}
|
|
|
|
?>
|