public function process(CliEngine $engine, $invokes = 1, $params = array(), $isDefaultParam = false, $additionalContext = null)
{
// shorthand
$runtimeConfig = $additionalContext->getRuntimeConfig();
// are there any processes in the table?
if (!isset($runtimeConfig->processes)) {
// we're done
return new CliResult(0);
}
// let's walk through the table
foreach ($runtimeConfig->processes as $details) {
if (isset($details->screenName)) {
echo "{$details->pid}:{$details->processName}:{$details->screenName}\n";
} else {
echo "{$details->pid}:{$details->processName}\n";
}
}
// all done
return new CliResult(CliResult::PROCESS_COMPLETE);
}