subject = $subject; $this->lifetime = $lifetime ?? AccessLifetime::veryShort; $this->group = $group; } public function jsonSerialize(): array { return [ 'class' => self::class, 'identity' => $this->getIdentity(), 'subject' => $this->subject, 'lifetime' => $this->lifetime->value, 'group' => $this->group, ]; } public function getIdentity(): string { return sprintf('route:%s', $this->subject); } public function getSubject(): string { return $this->subject; } public function getGroup(): ?string { return $this->group; } public function getLifetime(): AccessLifetime { return $this->lifetime; } public function isOnce(): bool { return false; } }