protected function run()
{
switch ($this->context->getAction()) {
case HippoTextUIContext::ACTION_HELP:
$this->showHelp();
$this->environment->setExitCode(0);
$this->environment->shutdown();
break;
case HippoTextUIContext::ACTION_VERSION:
$this->showVersion();
$this->environment->setExitCode(0);
$this->environment->shutdown();
break;
case HippoTextUIContext::ACTION_CHECK:
$this->runChecks();
break;
default:
throw new Exception('Unrecognized action');
}
}