a1ee62ec9f3bc0a25f646f81d923cf39787ba983
[shipsimu.git] / application / ship-simu / interfaces / class_Personellizer.php
1 <?php
2 /**
3  * An interface for all personells
4  *
5  * @author              Roland Haeder <webmaster@ship-simu.org>
6  * @version             0.0.0
7  * @copyright   Copyright(c) 2007, 2008 Roland Haeder, this is free software
8  * @license             GNU GPL 3.0 or any newer version
9  * @link                http://www.ship-simu.org
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <http://www.gnu.org/licenses/>.
23  */
24 interface Personellizer extends FrameworkInterface {
25                 ///////////////////////
26          /// General methods ///
27         ///////////////////////
28
29         /**
30          * Remove min/max age
31          *
32          * @return      void
33          */
34         function removeMinMaxAge ();
35
36         /**
37          * Create a valid birthday
38          *
39          * @return void
40          */
41         function createBirthday ();
42
43         /**
44          * Verify if given year/month/day is a valid date combination
45          *
46          * @param               $year   4-digit year (valid  : 2007, 1946,
47          *                                                    invalid: 24, 2a, aa)
48          * @param               $month  1 to 2-digit month (range: 1 to 12)
49          * @param               $day            1 to 2-digit day (range: 1 to 31/30/29/28)
50          * @return      boolean true  = date is valid,
51          *                                      false = date is invalid
52          */
53         function isDateValid ($year, $month, $day);
54
55                 /////////////////////////
56          //// Status requests ////
57         /////////////////////////
58
59         /**
60          * Is the person employed?
61          *
62          * @return      boolean true  = person is employed
63          *                                      false = person is umemployed
64          */
65         function isEmployed ();
66
67         /**
68          * Is the person married? (to which one doesn't matter here)
69          *
70          * @return      boolean true  = person is married
71          *                                      false = person is not married
72          */
73         function isMarried ();
74
75         /**
76          * Is the person a male?
77          *
78          * @return      boolean true  = person is male
79          *                                      false = person is not male (maybe female? ;-))
80          */
81         function isMale ();
82
83         /**
84          * Is the person a female?
85          *
86          * @return      boolean true  = person is female
87          *                                      false = person is not female (maybe male? ;-))
88          */
89         function isFemale ();
90
91                 /////////////////
92          //// Getters ////
93         /////////////////
94
95         /**
96          * Getter for surname
97          *
98          * @return      $surname        The person's surname
99          */
100         function getSurname ();
101
102         /**
103          * Getter for family name
104          *
105          * @return      $family The person's family name
106          */
107         function getFamily ();
108
109         /**
110          * Getter for gender
111          *
112          * @return      $gender The person's gender (F/M)
113          */
114         function getGender ();
115
116         /**
117          * Getter for salary
118          *
119          * @return      $salary The person's current salary
120          */
121         function getSalary ();
122
123                 /////////////////
124          //// Setters ////
125         /////////////////
126
127         /**
128          * Setter for surname
129          *
130          * @param               $surname        The person's new surname as a string
131          * @return      void
132          */
133         function setSurname ($surname);
134
135         /**
136          * Setter for family name
137          *
138          * @param               $family The person's new family name as a string
139          * @return      void
140          */
141         function setFamily ($family);
142
143         /**
144          * Setter for gender. Do not use this so often... ;-)
145          * This method shall only be used when the person is "created"
146          *
147          * @param               $gender The person's new gender as a 1-char string (M/F)
148          * @return      void
149          */
150         function setGender ($gender);
151
152         /**
153          * Setter for employment status
154          *
155          * @param               $employed       The person's new employment stats
156          * @return      void
157          */
158         function setEmployed ($employed);
159
160         /**
161          * Setter for marrital status
162          *
163          * @param               $married        The person's new marrital status
164          * @return      void
165          */
166         function setMarried ($married);
167
168         /**
169          * Setter for a already validated birthday.
170          *
171          * @param               $year   The person's new year-of-birth (4 digits)
172          * @param               $month  The person's new month-of-birth (1 to 2 digits)
173          * @param               $day            The person's new day-of-birth (1 to 2 digits)
174          * @return      void
175          */
176         function setBirthday ($year, $month, $day);
177
178                 /////////////////////////////////////
179          //// Methods for changing salary ////
180         /////////////////////////////////////
181
182         /**
183          * Increase person's salary by a specified amount
184          *
185          * @param               $add            Add this float amount to current salary
186          * @return      void
187          */
188         function increaseSalary ($add);
189
190         /**
191          * Decrease person's salary by a specified amount
192          *
193          * @param               $sub            Subtract this float amount to current salary
194          * @return      void
195          */
196         function decreaseSalary ($sub);
197 }
198
199 // [EOF]
200 ?>