$connect->beginTransaction(); $status = $operationObject->createYear($data, $userId); if ($status == 1) { $connect->commit(); echo AppUtil::getReturnStatus("success", "Year Created Successfully...!!!"); } else { if ($status == 0) { $connect->rollBack(); echo AppUtil::getReturnStatus("failure", "Could Not Create Year"); } else { echo AppUtil::getReturnStatus("failure", "Year with Same Date Range Already Exist"); } } break; case "getCurrentYearHolidayDetails": $operationObject->getCurrentYearHolidayDetails(); break; case "createHoliday": $connect->beginTransaction(); if ($operationObject->createHoliday($data, $userId)) { $connect->commit(); echo AppUtil::getReturnStatus("success", "Holiday Created Successfully...!!!"); } else { $connect->rollBack(); echo AppUtil::getReturnStatus("failure", "Could Not Create Holiday"); } break; case 'removeHoliday': $connect->beginTransaction(); if ($operationObject->removeHoliday($data, $userId)) { $connect->commit();