1 | # ------------------------------------------------------------------------------ |
---|
2 | # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. |
---|
3 | # |
---|
4 | # This file is part of FCM, tools for managing and building source code. |
---|
5 | # |
---|
6 | # FCM is free software: you can redistribute it and/or modify |
---|
7 | # it under the terms of the GNU General Public License as published by |
---|
8 | # the Free Software Foundation, either version 3 of the License, or |
---|
9 | # (at your option) any later version. |
---|
10 | # |
---|
11 | # FCM is distributed in the hope that it will be useful, |
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | # GNU General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with FCM. If not, see <http://www.gnu.org/licenses/>. |
---|
18 | # ------------------------------------------------------------------------------ |
---|
19 | |
---|
20 | use strict; |
---|
21 | use warnings; |
---|
22 | |
---|
23 | package FCM::Admin::User; |
---|
24 | use base qw{FCM::Class::HASH}; |
---|
25 | use overload q{""} => \&get_name; |
---|
26 | |
---|
27 | __PACKAGE__->class({ |
---|
28 | name => '$', |
---|
29 | display_name => '$', |
---|
30 | email => '$', |
---|
31 | }); |
---|
32 | |
---|
33 | 1; |
---|
34 | __END__ |
---|
35 | |
---|
36 | =head1 NAME |
---|
37 | |
---|
38 | FCM::Admin::User |
---|
39 | |
---|
40 | =head1 SYNOPSIS |
---|
41 | |
---|
42 | use FCM::Admin::User; |
---|
43 | $user = FCM::Admin::User->new({name => 'bob'}); |
---|
44 | $user->set_display_name('Robert Smith'); |
---|
45 | $user->set_email('robert.smith@somewhere.org'); |
---|
46 | |
---|
47 | =head1 DESCRIPTION |
---|
48 | |
---|
49 | An object of this class is used to store the data model of a user. |
---|
50 | |
---|
51 | =head1 METHODS |
---|
52 | |
---|
53 | =over 4 |
---|
54 | |
---|
55 | =item FCM::Admin::User->new(\%arguments) |
---|
56 | |
---|
57 | Creates a new instance. The keys of the %argument hash may contain "name", |
---|
58 | "display_name", and/or "email". |
---|
59 | |
---|
60 | =item $user->get_name() |
---|
61 | |
---|
62 | Returns the name/ID of the user. |
---|
63 | |
---|
64 | =item $user->get_display_name() |
---|
65 | |
---|
66 | Returns the display name of the user. |
---|
67 | |
---|
68 | =item $user->get_email() |
---|
69 | |
---|
70 | Returns the e-mail address of the user. |
---|
71 | |
---|
72 | =item $user->set_name($value) |
---|
73 | |
---|
74 | Sets the name/ID of the user. |
---|
75 | |
---|
76 | =item $user->set_display_name($value) |
---|
77 | |
---|
78 | Sets the display name of the user. |
---|
79 | |
---|
80 | =item $user->set_email($value) |
---|
81 | |
---|
82 | Sets the e-mail address of the user. |
---|
83 | |
---|
84 | =back |
---|
85 | |
---|
86 | =head1 COPYRIGHT |
---|
87 | |
---|
88 | Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. |
---|
89 | |
---|
90 | =cut |
---|