Skip to content

Commit 79d6119

Browse files
committed
Save last response status to $this->lastStatus
1 parent 4848898 commit 79d6119

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Subreg/Client.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ class Client extends \Ease\Molecule
5050
* @var array
5151
*/
5252
public $lastResult = [];
53+
54+
/**
55+
* Last Request response status
56+
* @var string
57+
*/
58+
public $lastStatus = null;
5359

5460
/**
5561
*
@@ -90,6 +96,10 @@ public function call($command, $params = [])
9096
$this->logError($responseRaw['error']);
9197
}
9298

99+
if(isset($responseRaw['status'])){
100+
$this->lastStatus = $responseRaw['status'];
101+
}
102+
93103
$this->lastResult = array_key_exists('data', $responseRaw) ? $responseRaw['data'] : null ;
94104

95105
return $this->lastResult;

0 commit comments

Comments
 (0)