public function destroyProcesses($aliases, $flags = Runtime::DESTROY_FORCE_SOFT, $params = [])
{
$promises = [];
foreach ($aliases as $alias) {
$promises[] = $this->destroyProcess($alias, $flags, $params);
}
return Promise::all($promises)->then(function () {
return 'Processes have been destroyed.';
}, function () {
throw new RejectionException('Some of the processes could not be destroyed.');
});
}