1 | <?php |
||
25 | abstract class BaseBuilder implements BuilderInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var Builder |
||
29 | */ |
||
30 | private $builder; |
||
31 | |||
32 | /** |
||
33 | * @var Storage |
||
34 | */ |
||
35 | private $store; |
||
36 | |||
37 | /** |
||
38 | * BaseBuilder constructor. |
||
39 | * @param Builder $builder |
||
40 | * @param Storage $store |
||
41 | */ |
||
42 | public function __construct(Builder $builder, Storage $store) |
||
47 | |||
48 | /** |
||
49 | * @param Readable $file |
||
50 | * @return iterable |
||
51 | * @throws \Railt\Io\Exception\ExternalFileException |
||
52 | * @throws \Railt\SDL\Exception\SyntaxException |
||
53 | */ |
||
54 | protected function loadFile(Readable $file) |
||
58 | |||
59 | /** |
||
60 | * @param InvocationPrimitive|PrimitiveInterface $invocation |
||
61 | * @param ContextInterface $context |
||
62 | * @return mixed |
||
63 | * @throws NotFoundException |
||
64 | */ |
||
65 | protected function invoke(InvocationPrimitive $invocation, ContextInterface $context) |
||
76 | |||
77 | /** |
||
78 | * @param TypeNameInterface $name |
||
79 | * @param ContextInterface|null $ctx |
||
80 | * @return DeferredInterface|null |
||
81 | */ |
||
82 | protected function loadType(TypeNameInterface $name, ContextInterface $ctx = null): ?DeferredInterface |
||
90 | } |
||
91 |