Params.php 465 B

1234567891011121314
  1. <?php
  2. namespace app\api\error\model;
  3. class Params extends ZskkErrorModel {
  4. protected $code = 3000;
  5. protected $msg = '参数校验失败';
  6. protected $data = null;
  7. protected $error = null;
  8. private static $instance = null;
  9. public static function instance($code = 3000, $msg = '参数校验失败') {
  10. $instance = is_null(self::$instance) ? new Params() :self::$instance;
  11. return $instance->setCode($code)->setMsg($msg);
  12. }
  13. }