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.
1.0 kB · 51 lines
PHP
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<?php
declare(strict_types=1);
namespace App\Domain\Preference;
use JsonSerializable;
/** * A named preference entry for an account. * Maps to the `account_pref` table in the actor-store schema. * * Lives inside an ActorStore scoped to a specific DID, so no `did` field here. */class AccountPref implements JsonSerializable{ public function __construct( private readonly int $id, private readonly string $name, private readonly string $valueJson, ) { }
public function getId(): int { return $this->id; }
public function getName(): string { return $this->name; }
public function getValueJson(): string { return $this->valueJson; }
/** * @return array<string, mixed> */ #[\ReturnTypeWillChange] public function jsonSerialize(): array { return [ 'id' => $this->id, 'name' => $this->name, 'valueJson' => $this->valueJson, ]; }}