function perform($jsonObject) { $action = $jsonObject->action; switch ($action) { case "load": return loadDepartment($jsonObject); case "save": return saveName($jsonObject); case "cut": return cut($jsonObject); case "selectDepartment": return getDepartmentId($jsonObject); case "selectEmployee": return getEmployeeId($jsonObject); } }
function perform($jsonObject) { $action = $jsonObject->action; switch ($action) { case "load": return loadCompany($jsonObject); case "save": return saveName($jsonObject); case "cut": return cut($jsonObject); case "reset": return resetCompany($jsonObject); case "selectDepartment": return getDepartmentId($jsonObject); } }