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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354<?php
declare(strict_types=1);
namespace App\Domain\Repo;
use DateTimeImmutable;use JsonSerializable;
class RepoRoot implements JsonSerializable{ public function __construct( private readonly string $did, private readonly string $cid, private readonly string $rev, private readonly DateTimeImmutable $indexedAt, ) { }
public function getDid(): string { return $this->did; }
public function getCid(): string { return $this->cid; }
public function getRev(): string { return $this->rev; }
public function getIndexedAt(): DateTimeImmutable { return $this->indexedAt; }
/** * @return array<string, mixed> */ #[\ReturnTypeWillChange] public function jsonSerialize(): array { return [ 'did' => $this->did, 'cid' => $this->cid, 'rev' => $this->rev, 'indexedAt' => $this->indexedAt->format(DATE_ATOM), ]; }}