class-wpml-tm-job-ts-status.php
700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class WPML_TM_Job_TS_Status {
/** @var string */
private $status;
/** @var array */
private $links = array();
/**
* WPML_TM_Job_TS_Status constructor.
*
* @param string $status
* @param array $links
*/
public function __construct( $status, $links ) {
$this->status = $status;
$this->links = $links;
}
/**
* @return string
*/
public function get_status() {
return $this->status;
}
/**
* @return array
*/
public function get_links() {
return $this->links;
}
public function __toString() {
if ( $this->status ) {
return wp_json_encode(
array(
'status' => $this->status,
'links' => $this->links,
)
);
}
return '';
}
}