1 | <?php |
||
25 | abstract class Builder implements BuilderInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var Readable |
||
29 | */ |
||
30 | protected $file; |
||
31 | |||
32 | /** |
||
33 | * @var Definition |
||
34 | */ |
||
35 | protected $definition; |
||
36 | |||
37 | /** |
||
38 | * @var Document |
||
39 | */ |
||
40 | protected $document; |
||
41 | |||
42 | /** |
||
43 | * @var RuleInterface |
||
44 | */ |
||
45 | protected $ast; |
||
46 | |||
47 | /** |
||
48 | * @var Process |
||
49 | */ |
||
50 | private $process; |
||
51 | |||
52 | /** |
||
53 | * Builder constructor. |
||
54 | * @param Context $ctx |
||
55 | * @param RuleInterface $ast |
||
56 | * @param Process $process |
||
57 | */ |
||
58 | public function __construct(Context $ctx, RuleInterface $ast, Process $process) |
||
66 | |||
67 | /** |
||
68 | * @param string $type |
||
69 | * @param Definition $from |
||
70 | * @param int $offset |
||
71 | * @return TypeDefinition |
||
72 | * @throws SDLTypeNotFoundException |
||
73 | */ |
||
74 | protected function load(string $type, Definition $from, int $offset): TypeDefinition |
||
85 | |||
86 | /** |
||
87 | * @param \Closure $then |
||
88 | */ |
||
89 | protected function async(\Closure $then): void |
||
93 | |||
94 | /** |
||
95 | * @param Definition|AbstractDefinition $definition |
||
96 | * @return Definition |
||
97 | */ |
||
98 | protected function bind(Definition $definition): Definition |
||
104 | |||
105 | /** |
||
106 | * @return string |
||
107 | * @throws \Railt\SDL\Exception\SyntaxException |
||
108 | */ |
||
109 | protected function getName(): string |
||
113 | |||
114 | /** |
||
115 | * @return string|null |
||
116 | */ |
||
117 | protected function findName(): ?string |
||
121 | } |
||
122 |