Example #1
0
 private function action(callable $command = null)
 {
     $error = call_user_func($command);
     if ($error !== 0) {
         cmd::echoL2('ERROR: ' . HelpMsg::Get($error) . PHP_EOL);
     } else {
         cmd::echoL2('Job DONE' . PHP_EOL);
         SC::setFailture(Settings::$service);
         if (cmd::$errcode != ErrorCodes::SERVICE_DOES_NOT_EXIST) {
             echo PHP_EOL . SC::Info() . PHP_EOL;
             echo PHP_EOL . SC::getFailture() . str_repeat(PHP_EOL, 2);
         }
     }
 }