-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.php
More file actions
33 lines (26 loc) · 705 Bytes
/
Copy pathUser.php
File metadata and controls
33 lines (26 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class User{
public int $id;
public string $name;
public string $department;
public string $db;
public function __construct( private string $dbconnection){
$this->dbconnection = $dbconnection;
#echo "Object properties initialized";
}
public function addUser(int $id, string $name, string $department){
$this->id=$id;
$this->name=$name;
$this->department=$department;
}
public function updateUser(int $id, string $name, string $department){
#Update code
}
public function deleteUser(int $id){
#Update code
}
function __destruct(){
echo "Destroying ".__CLASS__;
}
}
?>