wpml-tp-client.php
1.42 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* Class WPML_TP_Client
*
* @author OnTheGoSystems
*/
class WPML_TP_Client {
/** @var WPML_TP_Project $project */
private $project;
/** @var WPML_TP_TM_Jobs $tm_jobs */
private $tm_jobs;
/** @var WPML_TP_API_Services $services */
private $services;
/** @var WPML_TP_API_Batches $batches */
private $batches;
/** @var WPML_TP_API_TF_Ratings $ratings */
private $ratings;
/** @var WPML_TP_API_TF_Feedback $feedback */
private $feedback;
public function __construct(
WPML_TP_Project $project,
WPML_TP_TM_Jobs $tm_jobs
) {
$this->project = $project;
$this->tm_jobs = $tm_jobs;
}
public function services() {
if ( ! $this->services ) {
$this->services = new WPML_TP_API_Services( $this );
}
return $this->services;
}
public function batches() {
if ( ! $this->batches ) {
$this->batches = new WPML_TP_API_Batches( $this );
}
return $this->batches;
}
/** @return WPML_TP_API_TF_Ratings */
public function ratings() {
if ( ! $this->ratings ) {
$this->ratings = new WPML_TP_API_TF_Ratings( $this );
}
return $this->ratings;
}
/** @return WPML_TP_API_TF_Feedback */
public function feedback() {
if ( ! $this->feedback ) {
$this->feedback = new WPML_TP_API_TF_Feedback( $this );
}
return $this->feedback;
}
/** @return WPML_TP_Project */
public function get_project() {
return $this->project;
}
public function get_tm_jobs() {
return $this->tm_jobs;
}
}