-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.php
More file actions
102 lines (95 loc) · 1.71 KB
/
User.php
File metadata and controls
102 lines (95 loc) · 1.71 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php declare(strict_types=1);
namespace Tests\AnnotationReader;
/**
* 用户
*
* @description 用户类
* @description 用于测试
* @author fdipzone
* @DateTime 2024-12-15 19:25:52
*
*/
class User
{
/**
* 姓名
*
* @Column name
* @Tag Name
* @Tag 中文姓名
* @var string
*/
private $name;
/**
* 年龄
*
* @Column age
* @Tag Age
* @var int
*/
private $age;
/**
* 职业
*
* @Column profession
* @Tag Profession
* @var string
*/
private $profession;
/**
* 初始化
*
* @author fdipzone
* @DateTime 2024-12-15 19:28:30
*
* @param string $name 姓名
* @param int $age 年龄
* @param string $profession 职业
*/
public function __construct(string $name, int $age, string $profession)
{
$this->name = $name;
$this->age = $age;
$this->profession = $profession;
}
/**
* 获取姓名
*
* @description 获取姓名
* @description 获取中文姓名
* @author fdipzone
* @DateTime 2024-12-15 19:30:13
*
* @return string
*/
public function name():string
{
return $this->name;
}
/**
* 获取年龄
*
* @description 获取年龄
* @author fdipzone
* @DateTime 2024-12-15 19:30:17
*
* @return int
*/
public function age():int
{
return $this->age;
}
/**
* 获取职业
*
* @description 获取职业
* @author fdipzone
* @DateTime 2024-12-15 19:30:21
*
* @return string
*/
public function profession():string
{
return $this->profession;
}
}