mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Save last payload in memory for request lifetime
This commit is contained in:
parent
14fac182ea
commit
9bd3e4dcbd
1 changed files with 15 additions and 0 deletions
|
|
@ -97,6 +97,11 @@ class Response extends SwooleResponse
|
||||||
const MODEL_DOMAIN = 'domain';
|
const MODEL_DOMAIN = 'domain';
|
||||||
const MODEL_DOMAIN_LIST = 'domainList';
|
const MODEL_DOMAIN_LIST = 'domainList';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $payload = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response constructor.
|
* Response constructor.
|
||||||
*/
|
*/
|
||||||
|
|
@ -240,6 +245,8 @@ class Response extends SwooleResponse
|
||||||
$output[$key] = $data[$key];
|
$output[$key] = $data[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->payload = $output;
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -264,4 +271,12 @@ class Response extends SwooleResponse
|
||||||
->send(yaml_emit($data, YAML_UTF8_ENCODING))
|
->send(yaml_emit($data, YAML_UTF8_ENCODING))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getPayload():array
|
||||||
|
{
|
||||||
|
return $this->payload;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue