Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Contracts;
4
5use SocialDept\AtpSchema\Data\LexiconDocument;
6
7interface DataGenerator
8{
9 /**
10 * Generate PHP class files from Lexicon definition.
11 */
12 public function generate(LexiconDocument $schema): string;
13
14 /**
15 * Generate and write class file to disk.
16 */
17 public function generateAndSave(LexiconDocument $schema, string $outputPath): string;
18
19 /**
20 * Generate class content without writing to disk.
21 */
22 public function preview(LexiconDocument $schema): string;
23
24 /**
25 * Set the base namespace for generated classes.
26 */
27 public function setBaseNamespace(string $namespace): void;
28
29 /**
30 * Set the output path for generated classes.
31 */
32 public function setOutputPath(string $path): void;
33}