本文整理汇总了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>
示例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>