This commit is contained in:
2024-01-29 10:39:53 +07:00
parent 545c404fdf
commit 72170f373a
143 changed files with 20188 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright (c) 2021. www.Hura.vn
*/
namespace Hura8\Interfaces;
class APIResponse
{
private $errCode = 0;
private $msg = '';
private $data;
public function __construct($errCode = 0, $msg = '', $data = null) {
$this->errCode = $errCode;
$this->msg = $msg;
$this->data = $data;
}
/**
* @return int
*/
public function getCode() {
return $this->errCode;
}
/**
* @return mixed if status = 'error'
*/
public function getMsg() {
return $this->msg;
}
/**
* @return mixed if status = 'ok'
*/
public function getData() {
return $this->data;
}
}