|
37 | 37 | type_xml_element as type_xml_element_new, |
38 | 38 | types as types_new |
39 | 39 | }; |
40 | | -use Dom\HTMLDocument; |
| 40 | +use Dom\{HTMLDocument, HTMLElement}; |
41 | 41 | use Flow\Calculator\Rounding; |
42 | 42 | use Flow\ETL\{Analyze, |
43 | 43 | Attribute\DocumentationDSL, |
|
165 | 165 | use Flow\ETL\Retry\DelayFactory\{Fixed, Fixed\FixedMilliseconds}; |
166 | 166 | use Flow\ETL\Retry\RetryStrategy\{AnyThrowable, OnExceptionTypes}; |
167 | 167 | use Flow\ETL\Row\{Entries, EntryFactory, SortOrder}; |
168 | | -use Flow\ETL\Row\Entry\{BooleanEntry, DateEntry, DateTimeEntry, EnumEntry, FloatEntry, IntegerEntry, JsonEntry, ListEntry, MapEntry, StringEntry, StructureEntry, TimeEntry, UuidEntry, XMLElementEntry, XMLEntry}; |
| 168 | +use Flow\ETL\Row\Entry\{BooleanEntry, |
| 169 | + DateEntry, |
| 170 | + DateTimeEntry, |
| 171 | + EnumEntry, |
| 172 | + FloatEntry, |
| 173 | + HTMLElementEntry, |
| 174 | + IntegerEntry, |
| 175 | + JsonEntry, |
| 176 | + ListEntry, |
| 177 | + MapEntry, |
| 178 | + StringEntry, |
| 179 | + StructureEntry, |
| 180 | + TimeEntry, |
| 181 | + UuidEntry, |
| 182 | + XMLElementEntry, |
| 183 | + XMLEntry}; |
169 | 184 | use Flow\ETL\Row\Entry\HTMLEntry; |
170 | 185 | use Flow\ETL\Row\{Entry, EntryReference, Reference, References}; |
171 | 186 | use Flow\ETL\Row\Formatter\ASCIISchemaFormatter; |
@@ -637,6 +652,15 @@ function html_entry(string $name, HTMLDocument|string|null $value, ?Metadata $me |
637 | 652 | return new HTMLEntry($name, $value, $metadata); |
638 | 653 | } |
639 | 654 |
|
| 655 | +/** |
| 656 | + * @return Entry<?HTMLElement> |
| 657 | + */ |
| 658 | +#[DocumentationDSL(module: Module::CORE, type: DSLType::ENTRY)] |
| 659 | +function html_element_entry(string $name, HTMLElement|string|null $value, ?Metadata $metadata = null) : Entry |
| 660 | +{ |
| 661 | + return new HTMLElementEntry($name, $value, $metadata); |
| 662 | +} |
| 663 | + |
640 | 664 | /** |
641 | 665 | * @param Entry<mixed> ...$entries |
642 | 666 | */ |
@@ -1978,6 +2002,15 @@ function html_schema(string $name, bool $nullable = false, ?Metadata $metadata = |
1978 | 2002 | return Definition::html($name, $nullable, $metadata); |
1979 | 2003 | } |
1980 | 2004 |
|
| 2005 | +/** |
| 2006 | + * @return Definition<HTMLElement> |
| 2007 | + */ |
| 2008 | +#[DocumentationDSL(module: Module::CORE, type: DSLType::SCHEMA)] |
| 2009 | +function html_element_schema(string $name, bool $nullable = false, ?Metadata $metadata = null) : Definition |
| 2010 | +{ |
| 2011 | + return Definition::html_element($name, $nullable, $metadata); |
| 2012 | +} |
| 2013 | + |
1981 | 2014 | /** |
1982 | 2015 | * @return Definition<\DOMDocument> |
1983 | 2016 | */ |
|
0 commit comments