Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11723315
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/Output/XMLOutput.php b/src/Output/XMLOutput.php
index e393b39..48b547d 100644
--- a/src/Output/XMLOutput.php
+++ b/src/Output/XMLOutput.php
@@ -1,71 +1,71 @@
<?php
namespace Keruald\Reporting\Output;
class XMLOutput extends Output {
public function render () : string {
- $report = $this->report;
+
$document = xmlwriter_open_memory();
xmlwriter_set_indent($document, true);
xmlwriter_set_indent_string($document, ' ');
xmlwriter_start_document($document, '1.0', 'UTF-8');
xmlwriter_start_element($document, 'report');
xmlwriter_start_attribute($document, 'title');
- xmlwriter_text($document, $report->title);
+ xmlwriter_text($document, $this->report->title);
xmlwriter_end_attribute($document);
- foreach ($report->sections as $section) {
+ foreach ($this->report->sections as $section) {
xmlwriter_start_element($document, 'section');
xmlwriter_start_attribute($document, 'title');
xmlwriter_text($document, $section->title);
xmlwriter_end_attribute($document);
foreach ($section->entries as $entry) {
xmlwriter_start_element($document, 'entry');
xmlwriter_start_attribute($document, 'title');
xmlwriter_text($document, $entry->title);
xmlwriter_end_attribute($document);
xmlwriter_start_element($document, 'text');
xmlwriter_text($document, $entry->text);
xmlwriter_end_element($document);
xmlwriter_end_element($document);
}
xmlwriter_end_element($document); // section
}
xmlwriter_start_element($document, 'data');
xmlwriter_start_attribute($document, 'title');
xmlwriter_text($document, "Properties");
xmlwriter_end_attribute($document);
- foreach ($report->properties as $key => $value) {
+ foreach ($this->report->properties as $key => $value) {
xmlwriter_start_element($document, 'entry');
xmlwriter_start_element($document, 'key');
xmlwriter_text($document, $key);
xmlwriter_end_element($document);
xmlwriter_start_element($document, 'value');
xmlwriter_text($document, $value);
xmlwriter_end_element($document);
xmlwriter_end_element($document);
}
xmlwriter_end_element($document); // data
xmlwriter_end_element($document); // report
xmlwriter_end_document($document);
return xmlwriter_output_memory($document);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 09:33 (11 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2990078
Default Alt Text
(2 KB)
Attached To
Mode
rKREPORT Keruald Report
Attached
Detach File
Event Timeline
Log In to Comment