Add basic request, response, and endpoint definitions for API

[MAILPOET-4135]
This commit is contained in:
Jan Jakes
2022-02-10 09:43:26 +01:00
committed by Veljko V
parent da951e77af
commit 18d722cd51
3 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<?php declare(strict_types = 1);
namespace MailPoet\Automation\API;
use WP_REST_Response;
class Response extends WP_REST_Response {
public function __construct(
array $data = null,
int $status = 200
) {
parent::__construct(['data' => $data], $status);
}
}