private function _saveEmployeeWorkShift($workShiftId, $empArray) { for ($i = 0; $i < sizeof($empArray); $i++) { $empWorkShift = new EmployeeWorkShift(); $empWorkShift->setWorkShiftId($workShiftId); $empWorkShift->setEmpNumber($empArray[$i]); $empWorkShift->save(); } }