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.5 kB · 64 lines
PHP
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465<?php
declare(strict_types=1);
namespace App\Application\Actions;
use JsonSerializable;
class ActionError implements JsonSerializable{ public const BAD_REQUEST = 'BAD_REQUEST'; public const INSUFFICIENT_PRIVILEGES = 'INSUFFICIENT_PRIVILEGES'; public const NOT_ALLOWED = 'NOT_ALLOWED'; public const NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; public const RESOURCE_NOT_FOUND = 'RESOURCE_NOT_FOUND'; public const SERVER_ERROR = 'SERVER_ERROR'; public const UNAUTHENTICATED = 'UNAUTHENTICATED'; public const VALIDATION_ERROR = 'VALIDATION_ERROR'; public const VERIFICATION_ERROR = 'VERIFICATION_ERROR';
private string $type;
private ?string $description;
public function __construct(string $type, ?string $description = null) { $this->type = $type; $this->description = $description; }
public function getType(): string { return $this->type; }
public function setType(string $type): self { $this->type = $type; return $this; }
public function getDescription(): ?string { return $this->description; }
public function setDescription(?string $description = null): self { $this->description = $description; return $this; }
/** * @return array<string, string|null> */ #[\ReturnTypeWillChange] public function jsonSerialize(): array { return [ 'type' => $this->type, 'description' => $this->description, ]; }}