1 | <?php |
||
29 | class Address { |
||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $cloudId; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $displayName; |
||
39 | |||
40 | /** |
||
41 | * Address constructor. |
||
42 | * |
||
43 | * @param string $cloudId |
||
44 | * @param string $displayName |
||
45 | */ |
||
46 | public function __construct($cloudId, $displayName = '') { |
||
50 | |||
51 | /** |
||
52 | * Get user federated id |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getCloudId() { |
||
61 | |||
62 | /** |
||
63 | * Get user id |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getUserId() { |
||
73 | |||
74 | /** |
||
75 | * Get user host without protocol and trailing slash |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getHostName() { |
||
91 | |||
92 | /** |
||
93 | * Get user display name, fallback to userId if it is empty |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getDisplayName() { |
||
100 | |||
101 | /** |
||
102 | * Checks if the user and host is the same with another address |
||
103 | * |
||
104 | * @param Address $address |
||
105 | * |
||
106 | * @return bool |
||
107 | */ |
||
108 | public function equalTo(Address $address) { |
||
114 | |||
115 | /** |
||
116 | * @param string $uid |
||
117 | * @return mixed |
||
118 | */ |
||
119 | protected function translateUid($uid) { |
||
129 | } |
||
130 |