コード例 #1
0
 public static function enable($params)
 {
     $name = $params->get('name');
     try {
         $result = Jobs::enable($name);
     } catch (Exception $e) {
         throw new RpcException($e->getMessage(), -31001);
     }
     return $result;
 }
コード例 #2
0
 private function enable($job)
 {
     $result = SourceJobs::enable($job);
     if ($result == false) {
         return $this->color->convert("\n%yJob not found%n");
     }
     return $this->color->convert("\n%gJob activated%n");
 }