-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathOldIntegration.php
More file actions
39 lines (32 loc) · 998 Bytes
/
OldIntegration.php
File metadata and controls
39 lines (32 loc) · 998 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
<?php
namespace App\Adapter;
/**
* Class OldIntegration
* @package App\Adapter\Component
*
* This class is the "Adaptee" of our pattern.
*/
class OldIntegration
{
const WSDL_URL = 'http://score-application.com.test/people_score.wsdl';
/**
* This method is just an example. It doesn't work. It's just to show how it would look like.
* That is why there are code commented, and the return is always the same.
*
* Here should be a lot of code that uses the PHP \SOAP client to call the external API.
*/
public function getScore($uuid)
{
//$soapClient = new \SoapClient(self::WSDL_URL, [
//'exceptions' => true
//]);
//$requestData = ['user_uuid' => $uuid];
//$response = $soapClient->GetScore($requestData);
$response = [
'uuid' => '7de2a62e-7628-4d2f-a02b-fe395c5ce85b',
'name' => 'Gabriel Anhaia',
'score' => 65.2
];
return $response;
}
}