Files
xstore/inc/Hura8/Interfaces/AppResponse.php
2025-10-04 11:46:59 +07:00

42 lines
734 B
PHP

<?php
namespace Hura8\Interfaces;
class AppResponse
{
const SUCCESS = 'ok';
const ERROR = 'error';
protected $status;
protected $msg = null;
protected $data;
public function __construct($status = 'ok', $msg = null, $data = null) {
$this->status = $status;
$this->msg = $msg;
$this->data = $data;
}
/**
* @return string which is 'ok' or 'error'
*/
public function getStatus() {
return $this->status;
}
/**
* @return mixed if status = 'error'
*/
public function getMsg() {
return $this->msg;
}
/**
* @return mixed if status = 'ok'
*/
public function getData() {
return $this->data;
}
}