Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/DataTable/Renderer/Xml.php')
-rw-r--r--core/DataTable/Renderer/Xml.php31
1 files changed, 1 insertions, 30 deletions
diff --git a/core/DataTable/Renderer/Xml.php b/core/DataTable/Renderer/Xml.php
index a18e475d04..9eb7db914b 100644
--- a/core/DataTable/Renderer/Xml.php
+++ b/core/DataTable/Renderer/Xml.php
@@ -30,32 +30,12 @@ class Xml extends Renderer
*
* @return string
*/
- function render()
+ public function render()
{
- $this->renderHeader();
return '<?xml version="1.0" encoding="utf-8" ?>' . "\n" . $this->renderTable($this->table);
}
/**
- * Computes the exception output and returns the string/binary
- *
- * @return string
- */
- function renderException()
- {
- $this->renderHeader();
-
- $exceptionMessage = $this->getExceptionMessage();
-
- $return = '<?xml version="1.0" encoding="utf-8" ?>' . "\n" .
- "<result>\n" .
- "\t<error message=\"" . $exceptionMessage . "\" />\n" .
- "</result>";
-
- return $return;
- }
-
- /**
* Converts the given data table to an array
*
* @param DataTable|DataTable/Map $table data table to convert
@@ -430,13 +410,4 @@ class Xml extends Renderer
}
return $out;
}
-
- /**
- * Sends the XML headers
- */
- protected function renderHeader()
- {
- // silent fail because otherwise it throws an exception in the unit tests
- @header('Content-Type: text/xml; charset=utf-8');
- }
}