Something went wrong. Try again.
A barebones implementation of an atproto PDS in PHP and Slim Framework 4.
pds php atproto
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657<?php
declare(strict_types=1);
namespace App\Domain\Did;
use DateTimeImmutable;use JsonSerializable;
/** * A cached DID document entry. * Mirrors the `did_doc` table from the reference TS DID-cache schema. */class DidDocEntry implements JsonSerializable{ /** * @param array<string, mixed> $doc Parsed DID document. */ public function __construct( private readonly string $did, private readonly array $doc, private readonly DateTimeImmutable $updatedAt, ) { }
public function getDid(): string { return $this->did; }
/** * @return array<string, mixed> */ public function getDoc(): array { return $this->doc; }
public function getUpdatedAt(): DateTimeImmutable { return $this->updatedAt; }
/** * @return array<string, mixed> */ #[\ReturnTypeWillChange] public function jsonSerialize(): array { return [ 'did' => $this->did, 'doc' => $this->doc, 'updatedAt' => $this->updatedAt->format(DATE_ATOM), ]; }}