service as $service) { if (($service['type'] ?? '') === 'AtprotoPersonalDataServer') { return $service['serviceEndpoint'] ?? null; } } return null; } /** * Get the handle from alsoKnownAs. */ public function getHandle(): ?string { foreach ($this->alsoKnownAs as $alias) { if (str_starts_with($alias, 'at://')) { return substr($alias, 5); } } return null; } /** * Convert to array. */ public function toArray(): array { return $this->raw; } }