1 | <?php |
||
23 | class Factory |
||
24 | { |
||
25 | /** |
||
26 | * @var ProcessorInterface[] |
||
27 | */ |
||
28 | private const NODE_MAPPINGS = [ |
||
29 | 'ObjectDefinition' => Definition\ObjectProcessor::class, |
||
30 | 'InterfaceDefinition' => Definition\InterfaceProcessor::class, |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @var Pipeline |
||
35 | */ |
||
36 | private $pipeline; |
||
37 | |||
38 | /** |
||
39 | * @var Document |
||
40 | */ |
||
41 | private $document; |
||
42 | |||
43 | /** |
||
44 | * @var RuleInterface |
||
45 | */ |
||
46 | private $ast; |
||
47 | |||
48 | /** |
||
49 | * Processor constructor. |
||
50 | * @param Document $document |
||
51 | * @param RuleInterface $ast |
||
52 | */ |
||
53 | 1 | public function __construct(Document $document, RuleInterface $ast) |
|
59 | |||
60 | /** |
||
61 | * @return Document |
||
62 | * @throws \Railt\Io\Exception\ExternalFileException |
||
63 | */ |
||
64 | 1 | public function process(): Document |
|
84 | |||
85 | /** |
||
86 | * @param RuleInterface $rule |
||
87 | * @return DefinitionInterface |
||
88 | * @throws \Railt\Io\Exception\ExternalFileException |
||
89 | */ |
||
90 | 1 | public function build(RuleInterface $rule): DefinitionInterface |
|
104 | } |
||
105 |