<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\X509\AttributeCertificate\Validation; use DateTimeImmutable; use SpomkyLabs\Pki\X509\Certificate\Extension\Target\Target; use SpomkyLabs\Pki\X509\CertificationPath\CertificationPath; final class ACValidationConfig { private DateTimeImmutable $evalTime; private array $targets; private function __construct( private readonly CertificationPath $holderPath, private readonly CertificationPath $issuerPath ) { $this->evalTime = new DateTimeImmutable(); $this->targets = []; } public static function create(CertificationPath $holderPath, CertificationPath $issuerPath): self { return new self($holderPath, $issuerPath); } public function holderPath(): CertificationPath { return $this->holderPath; } public function issuerPath(): CertificationPath { return $this->issuerPath; } public function withEvaluationTime(DateTimeImmutable $dt): self { $obj = clone $this; $obj->evalTime = $dt; return $obj; } public function evaluationTime(): DateTimeImmutable { return $this->evalTime; } public function withTargets(Target ...$targets): self { $obj = clone $this; $obj->targets = $targets; return $obj; } public function targets(): array { return $this->targets; } } 