當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kernel::remove_by_name方法代碼示例

本文整理匯總了PHP中kernel::remove_by_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP kernel::remove_by_name方法的具體用法?PHP kernel::remove_by_name怎麽用?PHP kernel::remove_by_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kernel的用法示例。


在下文中一共展示了kernel::remove_by_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: kernel

                        require_once "{$plugin_start_appliance_hook}";
                        $appliance_function = "openqrm_" . "{$plugin_name}" . "_appliance";
                        $appliance_function = str_replace("-", "_", $appliance_function);
                        // stop
                        $appliance_function("stop", $appliance_fields);
                        // remove
                        $appliance_function("remove", $appliance_fields);
                    }
                }
                // remove appliance
                $appliance->remove($appliance_id);
            }
        }
        // remove kernel
        $kernel = new kernel();
        $kernel->remove_by_name("resource{$local_server_id}");
        // remove image
        $image = new image();
        $image->remove_by_name("resource{$local_server_id}");
        // remove storage serveer
        $storage = new storage();
        $storage->remove_by_name("resource{$local_server_id}");
        break;
    default:
        $event->log("{$local_server_command}", $_SERVER['REQUEST_TIME'], 3, "local-server-action", "No such local-server command ({$local_server_command})", "", "", 0, 0, 0);
        break;
}
?>

</body>
開發者ID:kelubo,項目名稱:OpenQRM,代碼行數:30,代碼來源:local-server-action.php

示例2: kernel

        if ($kernel->id > 0) {
            $event->log("{$kernel_command}", $_SERVER['REQUEST_TIME'], 5, "kernel-action", "Kernel name must be unique! Not adding new kernel " . $kernel_name, "", "", 0, 0, 0);
        } else {
            if ($kernel_name == 'default') {
                $kernel_fields["kernel_id"] = 1;
            } else {
                $kernel_fields["kernel_id"] = (int) str_replace(".", "", str_pad(microtime(true), 15, "0"));
            }
            $kernel->add($kernel_fields);
        }
        break;
    case 'update':
        $kernel = new kernel();
        $kernel->update($kernel_id, $kernel_fields);
        break;
    case 'remove':
        $kernel = new kernel();
        $kernel->remove($kernel_id);
        break;
    case 'remove_by_name':
        $kernel = new kernel();
        $kernel->remove_by_name($kernel_name);
        break;
    default:
        $event->log("{$kernel_command}", $_SERVER['REQUEST_TIME'], 3, "kernel-action", "No such kernel command ({$kernel_command})", "", "", 0, 0, 0);
        break;
}
?>

</body>
開發者ID:kelubo,項目名稱:OpenQRM,代碼行數:30,代碼來源:kernel-action.php


注:本文中的kernel::remove_by_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。