2022-05-28 19:36:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Services\Activity;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class ActivityLogTargetableService
|
|
|
|
{
|
|
|
|
protected ?Model $actor = null;
|
|
|
|
|
|
|
|
protected ?Model $subject = null;
|
|
|
|
|
2022-06-18 16:07:44 +00:00
|
|
|
protected ?int $apiKeyId = null;
|
|
|
|
|
2022-05-28 19:36:26 +00:00
|
|
|
public function setActor(Model $actor): void
|
|
|
|
{
|
|
|
|
$this->actor = $actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setSubject(Model $subject): void
|
|
|
|
{
|
|
|
|
$this->subject = $subject;
|
|
|
|
}
|
|
|
|
|
2022-06-18 16:07:44 +00:00
|
|
|
public function setApiKeyId(?int $apiKeyId): void
|
|
|
|
{
|
|
|
|
$this->apiKeyId = $apiKeyId;
|
|
|
|
}
|
|
|
|
|
2022-05-28 19:36:26 +00:00
|
|
|
public function actor(): ?Model
|
|
|
|
{
|
|
|
|
return $this->actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function subject(): ?Model
|
|
|
|
{
|
|
|
|
return $this->subject;
|
|
|
|
}
|
|
|
|
|
2022-06-18 16:07:44 +00:00
|
|
|
public function apiKeyId(): ?int
|
|
|
|
{
|
|
|
|
return $this->apiKeyId;
|
|
|
|
}
|
|
|
|
|
2022-05-28 19:36:26 +00:00
|
|
|
public function reset(): void
|
|
|
|
{
|
|
|
|
$this->actor = null;
|
|
|
|
$this->subject = null;
|
2022-06-18 16:07:44 +00:00
|
|
|
$this->apiKeyId = null;
|
2022-05-28 19:36:26 +00:00
|
|
|
}
|
|
|
|
}
|