Exemple #1
0
    echo "No command specified.";
    return;
}
switch ($cmd) {
    case "save":
        if (isset($name) && isset($sequence)) {
            $save = $pattern->save($name, $sequence);
            echo json_encode($save);
        } else {
            echo "Missing Required Parameters";
            return;
        }
        break;
    case "rename":
        if (isset($from) && isset($to)) {
            $rename = $pattern->rename($from, $to);
            echo json_encode($rename);
        } else {
            echo "Missing Required Parameters";
            return;
        }
        break;
    case "delete":
        if (isset($items)) {
            $delete = $pattern->delete($items);
            echo json_encode($delete);
        } else {
            echo "Missing Required Parameters";
            return;
        }
        break;