示例#1
0
function perform($jsonObject)
{
    $action = $jsonObject->action;
    switch ($action) {
        case "load":
            return loadEmployee($jsonObject);
        case "save":
            return saveEmployee($jsonObject);
        case "cut":
            return cut($jsonObject);
    }
}
示例#2
0
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);
    }
}