Files
xstore/inc/Hura8/Interfaces/APIResponse.php

43 lines
689 B
PHP
Raw Normal View History

2025-10-04 11:46:59 +07:00
<?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;
}
}