|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | use Flow\ETL\Config; |
| 4 | +use Flow\ETL\Extractor\ArrayExtractor; |
| 5 | +use Flow\ETL\Extractor\CacheExtractor; |
| 6 | +use Flow\ETL\Extractor\ChainExtractor; |
| 7 | +use Flow\ETL\Extractor\ChunkExtractor; |
| 8 | +use Flow\ETL\Extractor\DataFrameExtractor; |
| 9 | +use Flow\ETL\Extractor\MemoryExtractor; |
| 10 | +use Flow\ETL\Extractor\PipelineExtractor; |
| 11 | +use Flow\ETL\Extractor\RowsExtractor; |
4 | 12 | use Flow\ETL\FlowContext; |
5 | 13 | use Flow\ETL\PHP\Type\Logical\DateTimeType; |
6 | 14 | use Flow\ETL\PHP\Type\Logical\DateType; |
7 | 15 | use Flow\ETL\PHP\Type\Logical\JsonType; |
8 | | -use Flow\ETL\PHP\Type\Logical\List\ListElement; |
9 | 16 | use Flow\ETL\PHP\Type\Logical\ListType; |
10 | | -use Flow\ETL\PHP\Type\Logical\Map\MapKey; |
11 | | -use Flow\ETL\PHP\Type\Logical\Map\MapValue; |
12 | 17 | use Flow\ETL\PHP\Type\Logical\MapType; |
13 | | -use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; |
14 | 18 | use Flow\ETL\PHP\Type\Logical\StructureType; |
15 | 19 | use Flow\ETL\PHP\Type\Logical\TimeType; |
16 | 20 | use Flow\ETL\PHP\Type\Logical\UuidType; |
|
42 | 46 | use Flow\ETL\Row\Entry\UuidEntry; |
43 | 47 | use Flow\ETL\Row\Entry\XMLElementEntry; |
44 | 48 | use Flow\ETL\Row\Entry\XMLEntry; |
| 49 | +use Flow\ETL\Row\Schema; |
45 | 50 | use Flow\ETL\Row\Schema\Definition; |
46 | 51 | use Flow\ETL\Rows; |
47 | 52 | use Flow\Tools\Rector\NewObjectToFunction; |
|
67 | 72 | StaticCallToFuncCallRector::class, |
68 | 73 | [ |
69 | 74 | // Building Blocks |
70 | | - new StaticCallToFuncCall(Flow\ETL\Row::class, 'create', 'Flow\ETL\DSL\row'), |
| 75 | + new StaticCallToFuncCall(Row::class, 'create', 'Flow\ETL\DSL\row'), |
71 | 76 | new StaticCallToFuncCall(Config::class, 'default', 'Flow\ETL\DSL\config'), |
72 | 77 | // Schema |
73 | 78 | new StaticCallToFuncCall(Definition::class, 'boolean', 'Flow\ETL\DSL\bool_schema'), |
|
85 | 90 | new StaticCallToFuncCall(Definition::class, 'uuid', 'Flow\ETL\DSL\uuid_schema'), |
86 | 91 | new StaticCallToFuncCall(Definition::class, 'xml', 'Flow\ETL\DSL\xml_schema'), |
87 | 92 | new StaticCallToFuncCall(Definition::class, 'xml_element', 'Flow\ETL\DSL\xml_element_schema'), |
88 | | - // Logical Types |
89 | | - new StaticCallToFuncCall(MapKey::class, 'integer', 'Flow\ETL\DSL\type_integer'), |
90 | | - new StaticCallToFuncCall(MapKey::class, 'string', 'Flow\ETL\DSL\type_string'), |
91 | | - new StaticCallToFuncCall(MapValue::class, 'boolean', 'Flow\ETL\DSL\type_boolean'), |
92 | | - new StaticCallToFuncCall(MapValue::class, 'datetime', 'Flow\ETL\DSL\type_datetime'), |
93 | | - new StaticCallToFuncCall(MapValue::class, 'float', 'Flow\ETL\DSL\type_float'), |
94 | | - new StaticCallToFuncCall(MapValue::class, 'integer', 'Flow\ETL\DSL\type_integer'), |
95 | | - new StaticCallToFuncCall(MapValue::class, 'json', 'Flow\ETL\DSL\type_json'), |
96 | | - new StaticCallToFuncCall(MapValue::class, 'list', 'Flow\ETL\DSL\type_list'), |
97 | | - new StaticCallToFuncCall(MapValue::class, 'map', 'Flow\ETL\DSL\type_map'), |
98 | | - new StaticCallToFuncCall(MapValue::class, 'object', 'Flow\ETL\DSL\type_object'), |
99 | | - new StaticCallToFuncCall(MapValue::class, 'string', 'Flow\ETL\DSL\type_string'), |
100 | | - new StaticCallToFuncCall(MapValue::class, 'structure', 'Flow\ETL\DSL\type_structure'), |
101 | | - new StaticCallToFuncCall(MapValue::class, 'uuid', 'Flow\ETL\DSL\type_uuid'), |
102 | | - new StaticCallToFuncCall(MapValue::class, 'xml', 'Flow\ETL\DSL\type_xml'), |
103 | | - new StaticCallToFuncCall(MapValue::class, 'xmlElement', 'Flow\ETL\DSL\type_xml_element'), |
104 | | - |
105 | | - new StaticCallToFuncCall(ListElement::class, 'boolean', 'Flow\ETL\DSL\type_boolean'), |
106 | | - new StaticCallToFuncCall(ListElement::class, 'datetime', 'Flow\ETL\DSL\type_datetime'), |
107 | | - new StaticCallToFuncCall(ListElement::class, 'float', 'Flow\ETL\DSL\type_float'), |
108 | | - new StaticCallToFuncCall(ListElement::class, 'integer', 'Flow\ETL\DSL\type_integer'), |
109 | | - new StaticCallToFuncCall(ListElement::class, 'json', 'Flow\ETL\DSL\type_json'), |
110 | | - new StaticCallToFuncCall(ListElement::class, 'list', 'Flow\ETL\DSL\type_list'), |
111 | | - new StaticCallToFuncCall(ListElement::class, 'map', 'Flow\ETL\DSL\type_map'), |
112 | | - new StaticCallToFuncCall(ListElement::class, 'object', 'Flow\ETL\DSL\type_object'), |
113 | | - new StaticCallToFuncCall(ListElement::class, 'string', 'Flow\ETL\DSL\type_string'), |
114 | | - new StaticCallToFuncCall(ListElement::class, 'structure', 'Flow\ETL\DSL\type_structure'), |
115 | | - new StaticCallToFuncCall(ListElement::class, 'uuid', 'Flow\ETL\DSL\type_uuid'), |
116 | | - new StaticCallToFuncCall(ListElement::class, 'xml', 'Flow\ETL\DSL\type_xml'), |
117 | | - new StaticCallToFuncCall(ListElement::class, 'xmlElement', 'Flow\ETL\DSL\type_xml_element'), |
118 | 93 | ] |
119 | 94 | ) |
120 | 95 | ->withConfiguredRule( |
|
124 | 99 | new NewObjectToFunction(Rows::class, 'Flow\ETL\DSL\rows'), |
125 | 100 | new NewObjectToFunction(Config::class, 'Flow\ETL\DSL\config'), |
126 | 101 | new NewObjectToFunction(FlowContext::class, 'Flow\ETL\DSL\flow_context'), |
127 | | - new NewObjectToFunction(Flow\ETL\Row\Schema::class, 'Flow\ETL\DSL\schema'), |
| 102 | + new NewObjectToFunction(Schema::class, 'Flow\ETL\DSL\schema'), |
128 | 103 |
|
129 | 104 | // Entries |
130 | 105 | new NewObjectToFunction(BooleanEntry::class, 'Flow\ETL\DSL\boolean_entry'), |
|
166 | 141 | new NewObjectToFunction(UuidType::class, 'Flow\ETL\DSL\type_uuid'), |
167 | 142 | new NewObjectToFunction(XMLElementType::class, 'Flow\ETL\DSL\type_xml_element'), |
168 | 143 | new NewObjectToFunction(XMLType::class, 'Flow\ETL\DSL\type_xml'), |
169 | | - new NewObjectToFunction(StructureElement::class, 'Flow\ETL\DSL\structure_element'), |
170 | 144 |
|
171 | 145 | // Extractors |
172 | | - new NewObjectToFunction(Flow\ETL\Extractor\CacheExtractor::class, 'from_cache'), |
173 | | - new NewObjectToFunction(Flow\ETL\Extractor\RowsExtractor::class, 'from_rows'), |
174 | | - new NewObjectToFunction(Flow\ETL\Extractor\ArrayExtractor::class, 'from_array'), |
175 | | - new NewObjectToFunction(Flow\ETL\Extractor\ChainExtractor::class, 'from_all'), |
176 | | - new NewObjectToFunction(Flow\ETL\Extractor\MemoryExtractor::class, 'from_memory'), |
177 | | - new NewObjectToFunction(Flow\ETL\Extractor\ChunkExtractor::class, 'chunks_from'), |
178 | | - new NewObjectToFunction(Flow\ETL\Extractor\PipelineExtractor::class, 'from_pipeline'), |
179 | | - new NewObjectToFunction(Flow\ETL\Extractor\DataFrameExtractor::class, 'from_data_frame'), |
| 146 | + new NewObjectToFunction(CacheExtractor::class, 'from_cache'), |
| 147 | + new NewObjectToFunction(RowsExtractor::class, 'from_rows'), |
| 148 | + new NewObjectToFunction(ArrayExtractor::class, 'from_array'), |
| 149 | + new NewObjectToFunction(ChainExtractor::class, 'from_all'), |
| 150 | + new NewObjectToFunction(MemoryExtractor::class, 'from_memory'), |
| 151 | + new NewObjectToFunction(ChunkExtractor::class, 'chunks_from'), |
| 152 | + new NewObjectToFunction(PipelineExtractor::class, 'from_pipeline'), |
| 153 | + new NewObjectToFunction(DataFrameExtractor::class, 'from_data_frame'), |
180 | 154 |
|
181 | 155 | ] |
182 | 156 | ) |
|
0 commit comments