1 | <?php |
||
26 | abstract class Builder implements BuilderInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var Pipeline |
||
30 | */ |
||
31 | protected $when; |
||
32 | |||
33 | /** |
||
34 | * @var Factory |
||
35 | */ |
||
36 | private $factory; |
||
37 | |||
38 | /** |
||
39 | * Builder constructor. |
||
40 | * @param Pipeline $pipeline |
||
41 | * @param Factory $factory |
||
42 | */ |
||
43 | public function __construct(Pipeline $pipeline, Factory $factory) |
||
48 | |||
49 | /** |
||
50 | * @param Definition|ProvidesTypeIndication $from |
||
51 | * @param ValueInterface $value |
||
52 | * @return array|mixed |
||
53 | * @throws \Railt\Io\Exception\ExternalFileException |
||
54 | */ |
||
55 | protected function valueOf(ProvidesTypeIndication $from, ValueInterface $value) |
||
65 | |||
66 | /** |
||
67 | * @param TypeDefinition $parent |
||
68 | * @param TypeDefinition $definition |
||
69 | * @param array $types |
||
70 | * @throws \Railt\Io\Exception\ExternalFileException |
||
71 | */ |
||
72 | protected function shouldBeTypeOf(TypeDefinition $parent, TypeDefinition $definition, array $types): void |
||
87 | |||
88 | /** |
||
89 | * @param string $type |
||
90 | * @param TypeDefinition $from |
||
91 | * @return TypeDefinition |
||
92 | * @throws \Railt\Reflection\Exception\TypeNotFoundException |
||
93 | */ |
||
94 | protected function load(string $type, TypeDefinition $from): TypeDefinition |
||
100 | |||
101 | /** |
||
102 | * @param RuleInterface $ast |
||
103 | * @param Definition $parent |
||
104 | * @return Definition |
||
105 | * @throws \Railt\Io\Exception\ExternalFileException |
||
106 | */ |
||
107 | protected function dependent(RuleInterface $ast, Definition $parent): Definition |
||
111 | } |
||
112 |