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.
123456789101112131415161718192021222324252627282930<?php
declare(strict_types=1);
namespace App\Domain\Common;
/** * Small helpers for canonicalizing user-provided identifiers * before storage or comparison. */final class StringNormalizer{ /** * Normalize a handle by trimming surrounding whitespace and lowercasing. * Returns null when the input is null. */ public static function normalizeHandle(?string $handle): ?string { return $handle === null ? null : strtolower(trim($handle)); }
/** * Normalize an email by trimming surrounding whitespace and lowercasing. */ public static function normalizeEmail(string $email): string { return strtolower(trim($email)); }}