class_CompanyEmployee.php
Go to the documentation of this file.00001 <?php
00024 class CompanyEmployee extends SimulatorPersonell {
00025
00026 private $employeeList = null;
00027
00028
00029 protected function __construct () {
00030
00031 parent::__construct(__CLASS__);
00032 }
00033
00034
00035 public final static function createCompanyEmployee ($surname, $family, $gender, $year, $month, $day, $married, $salary) {
00036
00037 $personellInstance = new CompanyEmployee();
00038
00039
00040 if (((defined('DEBUG_COMPANY_EMPLOYEE')) && (defined('DEBUG_PERSONELL'))) || (defined('DEBUG_ALL'))) {
00041 $personellInstance->debugOutput(sprintf("[%s:%d] Der/Die Angestellte <strong>%s %s</strong> wird angelegt.",
00042 __CLASS__,
00043 __LINE__,
00044 $surname,
00045 $family
00046 ));
00047 }
00048
00049
00050 if ($personellInstance->isDateValid($year, $month, $day) === false) {
00051
00052 throw new BirthdayInvalidException(array($year, $month, $day), self::EXCEPTION_BIRTH_DATE_IS_INVALID);
00053 }
00054
00055
00056 $personellInstance->setBirthday($year, $month, $day);
00057
00058
00059 $personellInstance->setEmployed(true);
00060 $personellInstance->setMarried($married);
00061
00062
00063 $personellInstance->setSurname($surname);
00064 $personellInstance->setFamily($family);
00065 $personellInstance->setGender($gender);
00066
00067
00068 $personellInstance->increaseSalary($salary);
00069
00070
00071 $personellInstance->removeEmployeeList();
00072 $personellInstance->removeMinMaxAge();
00073
00074
00075 return $personellInstance;
00076 }
00077
00078
00079 private function removeEmployeeList () {
00080 unset($this->employeeList);
00081 }
00082 }
00083
00084
00085 ?>