public function addEmployee($type) { $employeeSolver = new EmployeeFactory(); $employee = $employeeSolver->solver($type); $employees[] = $employee; return $employee; }
function employeeList() { $list = array(); $result = mysql_query("SELECT empid FROM employee"); $i = 0; while ($row = mysql_fetch_assoc($result)) { $list[$i] = EmployeeFactory::createEmployee($row['empid']); $i++; } return $list; }
function begin() { if ($user = $this->models->getUser()) { $reciever = EmployeeFactory::createEmployee($_POST[employee]); $senderShifts = ShiftFactory::createEmpShift($user->getEmployeeId()); $recieverShifts = ShiftFactory::createEmpShift($_POST[employee]); $this->views->populate('recieverShifts', $recieverShifts); $this->views->populate('senderShifts', $senderShifts); $this->views->populate('reciever', $reciever); $this->views->flush('body', 'change'); } else { header('location: /Users/Login/'); } }
/** * Returns the date (in UNIX-time) * @return The date of the shift (in UNIX-time) */ function get_employee() { return EmployeeFactory::createEmployee($this->empID); }
function getEmployee() { return EmployeeFactory::createEmployee($this->employee_id); }
public function testBadInstance() { $this->setExpectedException('Exception'); EmployeeFactory::build('BadName'); }