File modules/cms/output/XmlOutput.class.php

Last commit: Mon Jan 31 00:00:48 2022 +0100	dankert	Some documentation...
1 <?php 2 3 namespace cms\output; 4 5 use cms\output\APIOutput; 6 use util\json\JSON; 7 use util\XML; 8 9 /** 10 * XML Rendering. 11 */ 12 class XmlOutput extends APIOutput 13 { 14 /** 15 * Renders the output in JSON Format. 16 */ 17 protected function renderOutput( $data ) 18 { 19 $xml = new XML(); 20 $xml->root = 'server'; // Name des XML-root-Elementes 21 return $xml->encode($data); 22 23 } 24 25 public function getContentType() 26 { 27 return 'application/xml'; 28 } 29 }
Download modules/cms/output/XmlOutput.class.php
History Mon, 31 Jan 2022 00:00:48 +0100 dankert Some documentation... Sun, 30 Jan 2022 23:38:42 +0100 dankert Refactoring: Only 1 http-endpoint for both the UI and the API. Path "/api" is not available any more, all API data is served under "/".