Move plugin files to a subfolder
[MAILPOET-3988]
This commit is contained in:
24
mailpoet/lib/API/JSON/SuccessResponse.php
Normal file
24
mailpoet/lib/API/JSON/SuccessResponse.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\API\JSON;
|
||||
|
||||
class SuccessResponse extends Response {
|
||||
public $data;
|
||||
|
||||
public function __construct(
|
||||
$data = [],
|
||||
$meta = [],
|
||||
$status = self::STATUS_OK
|
||||
) {
|
||||
parent::__construct($status, $meta);
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function getData() {
|
||||
if ($this->data === null) return [];
|
||||
|
||||
return [
|
||||
'data' => $this->data,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user