diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index c362df0251..ec5e24497c 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -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; + } }