1 | <?php |
||
26 | class Response |
||
27 | { |
||
28 | /** |
||
29 | * The json_decoded message data from ARI |
||
30 | * |
||
31 | * @var object |
||
32 | */ |
||
33 | protected $response; |
||
34 | |||
35 | /** |
||
36 | * @param string $response The raw json response response data from ARI |
||
37 | */ |
||
38 | 59 | public function __construct($response) |
|
39 | { |
||
40 | 59 | if (is_array($response)) { // For some reason, playback is an array, so this fixes that problem |
|
41 | $this->response = json_decode(json_encode($response), false); |
||
42 | 59 | } elseif (is_object($response)) { |
|
43 | 59 | $this->response = $response; |
|
44 | 59 | } else { |
|
45 | 35 | $this->response = json_decode($response); |
|
46 | } |
||
47 | 59 | } |
|
48 | |||
49 | /** |
||
50 | * @param $propertyName |
||
51 | * @return mixed |
||
52 | */ |
||
53 | protected function getResponseValue($propertyName) |
||
57 | } |
||
58 |