trafficmonitor init...2
This commit is contained in:
parent
c2abd37cf6
commit
e86582941d
@ -10,5 +10,4 @@ abstract class AuthDTO extends CommonDTO
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
abstract public function toArray();
|
||||
}
|
||||
|
||||
@ -15,11 +15,4 @@ class GoogleDTO extends AuthDTO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'access_code' => $this->access_code,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,12 +16,4 @@ class LocalDTO extends AuthDTO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'passwd' => $this->passwd,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,16 +20,4 @@ class CollectorDTO extends CommonDTO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'uid' => $this->uid,
|
||||
'trafficinfo_uid' => $this->trafficinfo_uid,
|
||||
'in' => $this->in,
|
||||
'out' => $this->out,
|
||||
'raw_in' => $this->raw_in,
|
||||
'raw_out' => $this->raw_out,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,4 +18,10 @@ abstract class CommonDTO
|
||||
"Undefined property or method: " . static::class . "::{$name}"
|
||||
);
|
||||
}
|
||||
|
||||
final public function toArray(): array
|
||||
{
|
||||
// $this가 가진 모든 public 프로퍼티와 그 값을 배열로 반환합니다.
|
||||
return get_object_vars($this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,15 +19,4 @@ class MylogDTO extends CommonDTO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'uid' => $this->uid,
|
||||
'user_uid' => $this->user_uid,
|
||||
'title' => $this->title,
|
||||
'content' => $this->content,
|
||||
'status' => $this->status,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,18 +22,4 @@ class TrafficDTO extends CommonDTO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'uid' => $this->uid,
|
||||
'client' => $this->client,
|
||||
'server' => $this->server,
|
||||
'server_ip' => $this->server_ip,
|
||||
'switch' => $this->switch,
|
||||
'ip' => $this->ip,
|
||||
'interface' => $this->interface,
|
||||
'status' => $this->status,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,19 +36,4 @@ class UserDTO extends CommonDTO
|
||||
}
|
||||
return parent::__get($name);
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'uid' => $this->uid,
|
||||
'id' => $this->id,
|
||||
'passwd' => $this->passwd,
|
||||
'confirmpassword' => $this->confirmpassword,
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
'mobile' => $this->mobile,
|
||||
'role' => $this->role,
|
||||
'status' => $this->status,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user