1 | <?php |
||
18 | abstract class ServiceClientBase implements ServiceClientInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $serviceURL; |
||
24 | |||
25 | /** |
||
26 | * @var CredentialsInterface |
||
27 | */ |
||
28 | protected $credentials; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $notification; |
||
34 | |||
35 | /** |
||
36 | * @var mixed |
||
37 | */ |
||
38 | protected $serviceClient; |
||
39 | |||
40 | /** |
||
41 | * @param array $serviceUrl |
||
42 | * @param CredentialsInterface $credentials |
||
43 | */ |
||
44 | public function __construct($serviceUrl, CredentialsInterface $credentials) |
||
53 | |||
54 | abstract protected function createClient(); |
||
55 | |||
56 | /** |
||
57 | * @param array $serviceURL |
||
58 | * @return $this |
||
59 | */ |
||
60 | public function setServiceURL($serviceURL) |
||
65 | |||
66 | /** |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getServiceURL() |
||
73 | |||
74 | /** |
||
75 | * @param CredentialsInterface $credentials |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setCredentials(CredentialsInterface $credentials) |
||
83 | |||
84 | /** |
||
85 | * @return CredentialsInterface |
||
86 | */ |
||
87 | public function getCredentials() |
||
91 | |||
92 | /** |
||
93 | * @param array $notification |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setNotification($notification) |
||
101 | |||
102 | /** |
||
103 | * @return array |
||
104 | */ |
||
105 | public function getNotificationOrThrowException() |
||
113 | |||
114 | /** |
||
115 | * @return mixed |
||
116 | */ |
||
117 | public function getClientConnection() |
||
121 | } |
||
122 |