mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Save last payload in memory for request lifetime
This commit is contained in:
@@ -97,6 +97,11 @@ class Response extends SwooleResponse
|
||||
const MODEL_DOMAIN = 'domain';
|
||||
const MODEL_DOMAIN_LIST = 'domainList';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $payload = [];
|
||||
|
||||
/**
|
||||
* Response constructor.
|
||||
*/
|
||||
@@ -240,6 +245,8 @@ class Response extends SwooleResponse
|
||||
$output[$key] = $data[$key];
|
||||
}
|
||||
|
||||
$this->payload = $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -264,4 +271,12 @@ class Response extends SwooleResponse
|
||||
->send(yaml_emit($data, YAML_UTF8_ENCODING))
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getPayload():array
|
||||
{
|
||||
return $this->payload;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user