1 | <?php |
||
3 | class ClassyUser extends ClassyBasis { |
||
|
|||
4 | |||
5 | /** |
||
6 | * Current user id |
||
7 | * @var int |
||
8 | */ |
||
9 | public $ID; |
||
10 | |||
11 | /** |
||
12 | * User posts url |
||
13 | * @var string |
||
14 | */ |
||
15 | public $link; |
||
16 | |||
17 | /** |
||
18 | * User login (example: anrw) |
||
19 | * @var string |
||
20 | */ |
||
21 | public $user_login; |
||
22 | |||
23 | /** |
||
24 | * It's basically sanitized version of user login, used for permalinks |
||
25 | * @var string |
||
26 | */ |
||
27 | public $user_nicename; |
||
28 | |||
29 | /** |
||
30 | * User email |
||
31 | * @var string |
||
32 | */ |
||
33 | public $user_email; |
||
34 | |||
35 | /** |
||
36 | * Human-Friendly name, like: Andrew Tolochka |
||
37 | * @var string |
||
38 | */ |
||
39 | public $display_name; |
||
40 | |||
41 | /** |
||
42 | * User password hash |
||
43 | * @var string |
||
44 | */ |
||
45 | private $user_pass; |
||
46 | |||
47 | /** |
||
48 | * Stores current post object |
||
49 | * @var object |
||
50 | */ |
||
51 | private $object; |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Main constructor function. Requires user id |
||
56 | * @param int $uid |
||
57 | */ |
||
58 | public function __construct($uid = null) { |
||
63 | |||
64 | private function verify_id($uid) { |
||
67 | |||
68 | /** |
||
69 | * Initialises Instance based on provided post id |
||
70 | */ |
||
71 | private function init() { |
||
76 | |||
77 | /** |
||
78 | * Returns user object |
||
79 | * |
||
80 | * @return object |
||
81 | */ |
||
82 | private function get_object() { |
||
85 | |||
86 | /** |
||
87 | * Returns user first name |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | public function first_name() { |
||
96 | |||
97 | /** |
||
98 | * Returns user display name |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function display_name() { |
||
107 | |||
108 | /** |
||
109 | * Returns user full name |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | public function full_name() { |
||
118 | |||
119 | /** |
||
120 | * Returns user user_login |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | public function user_login() { |
||
129 | |||
130 | /** |
||
131 | * Returns user email |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | public function email() { |
||
140 | |||
141 | /** |
||
142 | * Returns author posts url |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function link() { |
||
153 | |||
154 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.