Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 35 lines 709 B view raw
1<?php 2 3namespace SocialDept\AtpSchema\Contracts; 4 5use SocialDept\AtpSchema\Data\LexiconDocument; 6 7interface LexiconRegistry 8{ 9 /** 10 * Register a lexicon document. 11 */ 12 public function register(LexiconDocument $document): void; 13 14 /** 15 * Get a lexicon document by NSID. 16 */ 17 public function get(string $nsid): ?LexiconDocument; 18 19 /** 20 * Check if a lexicon document exists. 21 */ 22 public function has(string $nsid): bool; 23 24 /** 25 * Get all registered lexicon documents. 26 * 27 * @return array<string, LexiconDocument> 28 */ 29 public function all(): array; 30 31 /** 32 * Clear all registered lexicon documents. 33 */ 34 public function clear(): void; 35}