function perform($jsonObject) { $action = $jsonObject->action; switch ($action) { case "load": return loadEmployee($jsonObject); case "save": return saveEmployee($jsonObject); case "cut": return cut($jsonObject); } }
function perform($jsonObject) { $action = $jsonObject->action; switch ($action) { case "load": return loadEmployee($jsonObject->id); case "blank": return loadBlank(); case "save": return saveEmployee($jsonObject); case "create": return create($jsonObject); case "cut": return cut($jsonObject); case "delete": return delete($jsonObject); } }