1 | <?php |
||
27 | class HTMLConverter implements ConverterInterface |
||
28 | { |
||
29 | use ConverterTrait; |
||
30 | |||
31 | /** |
||
32 | * table class name |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $class_name = 'table-csv-data'; |
||
37 | |||
38 | /** |
||
39 | * @var XMLConverter |
||
40 | */ |
||
41 | protected $xml_converter; |
||
42 | |||
43 | /** |
||
44 | * New Instance |
||
45 | */ |
||
46 | 2 | public function __construct() |
|
54 | |||
55 | /** |
||
56 | * HTML table class name setter |
||
57 | * |
||
58 | * @param string $class_name |
||
59 | * |
||
60 | * @return self |
||
61 | */ |
||
62 | 2 | public function className(string $class_name): self |
|
71 | |||
72 | /** |
||
73 | * HTML td field name attribute setter |
||
74 | * |
||
75 | * @param string $attribute_name |
||
76 | * |
||
77 | * @return self |
||
78 | */ |
||
79 | 2 | public function fieldAttributeName(string $attribute_name) |
|
86 | |||
87 | /** |
||
88 | * HTML tr record offset attribute setter |
||
89 | * |
||
90 | * @param string $attribute_name |
||
91 | * |
||
92 | * @return self |
||
93 | */ |
||
94 | 2 | public function recordOffsetAttributeName(string $attribute_name) |
|
101 | |||
102 | /** |
||
103 | * Convert an Record collection into a DOMDocument |
||
104 | * |
||
105 | * @param array|Traversable $records the CSV records collection |
||
106 | * |
||
107 | * @return DOMDocument |
||
108 | */ |
||
109 | 2 | public function convert($records) |
|
118 | } |
||
119 |