<?php
 declare(strict_types=1); namespace SpomkyLabs\Pki\X509\Certificate\Extension\AccessDescription; use SpomkyLabs\Pki\ASN1\Type\Constructed\Sequence; use SpomkyLabs\Pki\ASN1\Type\Primitive\ObjectIdentifier; use SpomkyLabs\Pki\X509\GeneralName\GeneralName; abstract class AccessDescription { protected function __construct( protected readonly string $accessMethod, protected readonly GeneralName $accessLocation ) { } abstract public static function fromASN1(Sequence $seq): static; public function accessMethod(): string { return $this->accessMethod; } public function accessLocation(): GeneralName { return $this->accessLocation; } public function toASN1(): Sequence { return Sequence::create(ObjectIdentifier::create($this->accessMethod), $this->accessLocation->toASN1()); } } 