3 * An interface for all personells
5 * @author Roland Haeder <webmaster@ship-simu.org>
7 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu Developer Team
8 * @license GNU GPL 3.0 or any newer version
9 * @link http://www.ship-simu.org
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.
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.
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/>.
24 interface Personellizer extends FrameworkInterface {
25 ///////////////////////
26 /// General methods ///
27 ///////////////////////
34 function removeMinMaxAge ();
37 * Create a valid birthday
41 function createBirthday ();
44 * Verify if given year/month/day is a valid date combination
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
53 function isDateValid ($year, $month, $day);
55 /////////////////////////
56 //// Status requests ////
57 /////////////////////////
60 * Is the person employed?
62 * @return boolean true = person is employed
63 * false = person is umemployed
65 function isEmployed ();
68 * Is the person married? (to which one doesn't matter here)
70 * @return boolean true = person is married
71 * false = person is not married
73 function isMarried ();
76 * Is the person a male?
78 * @return boolean true = person is male
79 * false = person is not male (maybe female? ;-))
84 * Is the person a female?
86 * @return boolean true = person is female
87 * false = person is not female (maybe male? ;-))
98 * @return $surname The person's surname
100 function getSurname ();
103 * Getter for family name
105 * @return $family The person's family name
107 function getFamily ();
112 * @return $gender The person's gender (F/M)
114 function getGender ();
119 * @return $salary The person's current salary
121 function getSalary ();
130 * @param $surname The person's new surname as a string
133 function setSurname ($surname);
136 * Setter for family name
138 * @param $family The person's new family name as a string
141 function setFamily ($family);
144 * Setter for gender. Do not use this so often... ;-)
145 * This method shall only be used when the person is "created"
147 * @param $gender The person's new gender as a 1-char string (M/F)
150 function setGender ($gender);
153 * Setter for employment status
155 * @param $employed The person's new employment stats
158 function setEmployed ($employed);
161 * Setter for marrital status
163 * @param $married The person's new marrital status
166 function setMarried ($married);
169 * Setter for a already validated birthday.
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)
176 function setBirthday ($year, $month, $day);
178 /////////////////////////////////////
179 //// Methods for changing salary ////
180 /////////////////////////////////////
183 * Increase person's salary by a specified amount
185 * @param $add Add this float amount to current salary
188 function increaseSalary ($add);
191 * Decrease person's salary by a specified amount
193 * @param $sub Subtract this float amount to current salary
196 function decreaseSalary ($sub);