FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ShowJob.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2022 Krishna Mahato <krishhtrishh9304@gmail.com>
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
11 namespace Fossology\UI\Api\Models;
12 
17 class ShowJob
18 {
23  private $jobId;
28  private $jobName;
33  private $jobQueue;
38  private $uploadId;
39 
48  {
49  $this->setJobId($jobId);
50  $this->setJobName($jobName);
51  $this->setJobQueue($jobQueue);
52  $this->setUploadId($uploadId);
53  }
54 
58  public function getJobId()
59  {
60  return $this->jobId;
61  }
62 
66  public function setJobId($jobId)
67  {
68  $this->jobId = intval($jobId);
69  }
70 
74  public function getJobName()
75  {
76  return $this->jobName;
77  }
78 
82  public function setJobName($jobName)
83  {
84  $this->jobName = $jobName;
85  }
86 
90  public function getJobQueue(): array
91  {
92  return $this->jobQueue;
93  }
94 
98  public function setJobQueue($jobQueue)
99  {
100  $this->jobQueue = $jobQueue;
101  }
102 
106  public function getUploadId()
107  {
108  return $this->uploadId;
109  }
110 
114  public function setUploadId($uploadId)
115  {
116  $this->uploadId = intval($uploadId);
117  }
118 
123  public function getJSON()
124  {
125  return json_encode($this->getArray());
126  }
127 
132  public function getArray()
133  {
134  return [
135  "jobId" => $this->getJobId(),
136  "jobName" => $this->getJobName(),
137  "jobQueue" => $this->getJobQueue(),
138  "uploadId" => $this->getUploadId()
139  ];
140  }
141 }
Model class to hold ShowJob info.
Definition: ShowJob.php:18
__construct($jobId, $jobName, $jobQueue, $uploadId)
Definition: ShowJob.php:47
int jobId
The id of the job.