error_code = $error_code; $this->error = $msg; } public function getError() { return $this->error; } public function getCodeError() { return array( 'code' => $this->error_code, 'error' => $this->error, ); } /**静态调用错误处理 */ public static function setStaticError($msg, $error_code = 0) { self::$static_error = $msg; self::$static_error_code = $error_code; } public static function getStaticError() { return self::$static_error; } public static function getStaticCodeError() { return array( 'code' => self::$static_error_code, 'error' => self::$static_error ); } }